I use variations of:Michael Vogel wrote:...but also a CheckCompilerOptions("..."), which could be placed into a (generally used) include file could help a little bit - so here's a simple start:
Code: Select all
Macro CompilerRequire(Expression, ErrorMessage = "Failed requirement")
CompilerIf (Not (Expression))
CompilerError ErrorMessage
CompilerEndIf
EndMacro
CompilerRequire(#PB_Compiler_Unicode)
CompilerRequire(#PB_Compiler_Thread, "Threadsafe mode must be enabled")
CompilerRequire(#PB_Compiler_OS <> #PB_OS_Linux, "This module is not implemented on Linux")
CompilerRequire(SizeOf(INTEGER) = 8, "Must use 64-bit compiler")