When the software is compiled in more than one Delphi version, it needs to deal with different versions of the situation, using the compiler condition technology.
In case of blog, compile instruction basic usage introduction: http://www.cnblogs.com/del/category/168694.html
The version of Delphi differentiates:
Version of RTL: Run-time Library runtime libraries, including System, Sysutils, Math three units. Provides functions and languages, compilers,
Operating system and process-related. There is a constant definition in the system unit:
Const
Rtlversion = 22.00; XE
Compiler version: View method, on the command line, switch to the corresponding Delphi installation directory in the bin directory, execute Dcc32.exe, such as XE:
You can see Embarcadero Delphi for Win32 compiler version 22.0.
System unit: {$EXTERNALSYM compilerversion}
inc File:
The. inc file is the meaning of include file. In the cell file, you can import it with the directive {$I ' Xxx.inc '}.. inc files can be written in a Delphi-compliant
Code. In addition: The obj file that introduces the C language is completed with the {$L path} instruction.
Common instructions for compiling instructions:
Instructions |
Optional values |
Range |
Comments |
{$MESSAGE hint| warn| error| FATAL ' msg '} |
|
Local |
|
{$LEGACYIFEND on} |
|
|
IfEnd Unified into the endif, the compiler will have a warning, open can be compatible with earlier versions |
{$HPPEMIT ' string '} |
|
|
The added characters are used at C + + compile time |
{$M +}/{$M-} |
|
Local |
As with {$TYPEINFO on}, specifies that the class generates information related to RTTI (Runtime Type information) |
{$EXTERNALSYM [' typenameinhpp ' [' Typenameinhppunion ']} |
|
|
Data type mapping, producing C + + header files, usually with $objtypename. |
{$B-} |
+ |
|
Complete Boolean expression calculation (no quick calculation) |
{$R-} |
+ |
|
Range checking (arrays, strings, etc.) |
{$T-} |
|
|
Typed @ operator |
{$X +} |
|
|
Extended syntax |
{$P +} |
|
|
Open string params |
{$J +} |
|
|
Writeable Structured consts |
{$H +} |
|
|
Use long strings by default |
{$Q-} |
|
|
Overflow Checking |
Pre-defined condition identifier: http://docwiki.embarcadero.com/RADStudio/Seattle/en/Conditional_compilation_ (Delphi)
Compiler version: Http://docwiki.embarcadero.com/RADStudio/Seattle/en/Compiler_Versions
Compiler character: Http://docwiki.embarcadero.com/RADStudio/Seattle/en/Delphi_Compiler_Directives_ (List) _index
[Delphi] Compilation conditions