Platform defines
English · Français
Useful tips before using platform defines
- Marco van de Voort: Development Tutorial (a.k.a Build FAQ) – general building guidelines
- Marco van de Voort: Creating a portable Pascal codebase. – general porting guidelines
- if you need to cast a pointer to an integer for arithmetic or you want to provide a spare field (like
taginTComponent) that may be used to store a pointer, usePtrIntas signed type, or betterPtrUIntas unsigned type.
Architecture defines
Note: This is a copy of the official FPC documentation which is the authorative version for the stable FPC version.
<thead>
</thead> <tbody>
</tbody>
Operating system defines
In the following tree, you have to follow leaves to their respective roots, in order to determine all defines. To check this information, refer to files in FPC sources: "compiler/systems/i_*.pas".
ATARIDPMI: MS-DOSGO32V2WATCOM
EMACSembeddedHASAMIGAAMIGAAMIGA68KAMIGAOS4
AROSMorphOS
GBA: GameBoy AdvanceJavaMACOS: Classic Macintosh (System 7 etc.)MSDOSMS-DOS 16-bit real mode (defined since FPC version 2.7.1)NATIVENT: NativeNTNDS: Nintendo DSNETWARE: NetWareNETWARE_CLIB: NetWare with classic libcNETWLIBC,NETWARE_LIBC: NetWare with modern libc
OS2: OS/2EMX: emx
PALMOS: PalmOS and Garnet OSSymbian: Symbian OSUNIXWDOSXWiiWINDOWS: all WindowsMSWINDOWSWIN16: 16-bit Windows 3.xWIN32: 32-bit WindowsWIN64: 64-bit Windows
WINCE,UNDER_CE,UNICODE: Windows CE, Windows mobile
Notes
UNICODE was defined till FPC 3.0.0, see User changes 3.0 § “define UNICODE was changed to FPC_OS_UNICODE”.
See also
- Delphi Wikia article “FreePascal detection and versioning”
- Free Pascal Documentation: Appendix G: Compiler defines during compilation
From the Free Pascal wiki, page "Platform defines", as it stood on 2021-04-01 after a change by Kai Burghardt, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.
Talk about this page
Nobody has opened a bench for this page yet. Sign in to open one.
