global compiler directives

From Free Pascal wiki
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Deutsch (de) English (en) français (fr) русский (ru)

Free Pascal supports compiler directives in the source file. Basically the same directives as in Turbo Pascal, Delphi and Apple Pascal (Mac OS) pascal compilers are supported. Some are recognized for compatibility only, and have no effect.

Syntax

General:

Specific:

Code generation

Data inclusion

Paths

Target-dependent

Novell NetWare only

Palm OS and Garnet OS only

  • {$appID} defines four-character application identifier
  • {$appName} determines the name of the application

Windows-based systems

  • {$imageBase} specifies DLL image base location
  • {$minStackSize}
  • {$maxStackSize}
  • {$setPEFlags}
  • {$version} defines version number of a DLL

Miscellaneous

Compile-time data

Ignored

  • {$description}: introduced for compatibility and as of FPC 3.0.4 ignored
  • {$G} would generate 80286 code with TP
  • {$localSymbols} or {$L}
  • {$N} (numeric processing)
  • {$O} enabled level 2 optimizations. It is not recognized anymore since FPC 2.0.0. Use {$optimization} instead.
  • {$weakPackageUnit}

See also

Directives, definitions and conditionals definitions
global compiler directives • local compiler directives

Conditional Compiler Options • Conditional compilation • Macros and Conditionals • Platform defines
$IF