[Delphi] Compilation conditions

Source: Internet
Author: User
Tags constant definition

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.