{$IFDEF LINUX}
//do Linux-specific code here
{$ENDIF}
{$IFDEF MSWINDOWS}
//do WIndows-specific code here
{$ENDIF}
보통 크로스 플랫폼으로 개발할때 이렇게 사용하는데 그 외 사용가능한 symbol입니다.
Conditional Symbol | Meaning | Defined In |
CPU386 | compiling on an 80386 or better | all versions of Kylix and Delphi |
VER80 | compiler version 8 | Delphi 1 |
VER90 | compiler version 9 | Delphi 2 |
VER93 | compiler version 9.3 | C++Builder 1 |
VER100 | compiler version 10 | Delphi 3 |
VER110 | compiler version 11 | C++Builder 3 |
VER120 | compiler version 12 | Delphi 4 |
VER125 | compiler version 12.5 | C++Builder 4 |
VER130 | compiler version 13 | Delphi/C++Builder 5 |
VER140 | compiler version 14 | Delphi/C++Builder 6, Kylix 1 & 2 |
BCB | Delphi code being compiled from within C++Builder | C++Builder |
GAMMA_TEST | Delphi code being compiled from a pre-release (gamma test) product | C++Builder 4 (this was a bug and should not be defined in any shipping product) |
WINDOWS | compiling for Win16 platform | Delphi 1 |
WIN32 | compiling for Win32 platform | 32-bit Delphi versions from 2 onwards |
MSWINDOWS | compiling for any Windows platform | Delphi 6 and later |
LINUX | compiling for any Linux platform | Kylix |
LINUX32 | compiling for 32-bit Linux platform | Kylix |
POSIX | Compiling for a POSIX-compliant OS | Kylix |
POSIX32 | Compiling for a 32-bit POSIX-compliant OS | Kylix |
PIC | position independent code being generated | Kylix when compiling shared objects |
ELF | compiling an ELF format executable file | Kylix |
PC_MAPPED_EXCEPTIONS | program counter based exception handling, as opposed to OS-based exception handling | Kylix |
DECLARE_GPL | compiling a GPL application | Kylix Open Edition |
CONDITIONALEXPRESSIONS | conditional directives support expression evaluation | Delphi/C++Builder 6 and later and Kylix |
그럼..
|