JEDI Help:CompilerVersions

From Project JEDI Wiki
Jump to navigationJump to search
JEDI Help

Search in JEDI Help

 
Search in all projects
 


Summary

Compiler symbols for detecting compiler and IDE version


Pascal

 {$IFDEF SYMBOL}
 // this code will be compiled if the symbol is defined
 {$ENDIF SYMBOL}


Description

Once jedi.inc is included at the top of your pascal source file, the following compiler symbols are defined depending on your compiler and IDE version.
These symbols can be used for conditional compilation based on the IDE or on the compiler version the code is compiled with.

The following symbols are defined subjected to the tool family:

Symbol Description
DELPHI Defined if compiled with Delphi
KYLIX Defined if compiled with Kylix
DELPHICOMPILER Defined if compiled with Delphi or Kylix/Delphi
BCB Defined if compiled with C++Builder
CPPBUILDER Defined if compiled with C++Builder (alias for BCB)
BCBCOMPILER Defined if compiled with C++Builder or Kylix/C++
DELPHILANGUAGE Defined if compiled with Delphi, Kylix or C++Builder
BORLAND Defined if compiled with Delphi, Kylix or C++Builder
FPC Defined if compiled with FPC


If the compiler is DELPHI, then the following symbols are defined depending on its version:

Symbol Description
DELPHI1 Defined when compiling with Delphi 1 (Codename WASABI/MANGO)
DELPHI2 Defined when compiling with Delphi 2 (Codename POLARIS)
DELPHI3 Defined when compiling with Delphi 3 (Codename IVORY)
DELPHI4 Defined when compiling with Delphi 4 (Codename ALLEGRO)
DELPHI5 Defined when compiling with Delphi 5 (Codename ARGUS)
DELPHI6 Defined when compiling with Delphi 6 (Codename ILLIAD)
DELPHI7 Defined when compiling with Delphi 7 (Codename AURORA)
DELPHI8 Defined when compiling with Delphi 8 (Codename OCTANE)
DELPHI2005 Defined when compiling with Delphi 2005 (Codename DIAMONDBACK)
DELPHI9 Alias for DELPHI2005
DELPHI10 Defined when compiling with Delphi 2006 (Codename DEXTER)
DELPHI2006 Alias for DELPHI10
DELPHI11 Defined when compiling with Delphi 2007 for Win32 (Codename SPACELY)
DELPHI2007 Alias for DELPHI11
DELPHI12 Defined when compiling with Delphi 2009 for Win32 (Codename TIBURON)
DELPHI2009 Alias for DELPHI12
DELPHI14 Defined when compiling with Delphi 2010 for Win32 (Codename WEAVER)
DELPHI2010 Alias for DELPHI14
DELPHI15 Defined when compiling with Delphi XE for Win32 (Codename FULCRUM)
DELPHIXE Alias for DELPHI15
DELPHI16 Defined when compiling with Delphi XE2 for Win32 and Win64 (Codename PULSAR)
DELPHIXE2 Alias for DELPHI16


Same as below, except that these symbols are defined for some version and for all versions newer than this one:

Symbol Description
DELPHI1_UP Defined when compiling with Delphi 1 or higher
DELPHI2_UP Defined when compiling with Delphi 2 or higher
DELPHI3_UP Defined when compiling with Delphi 3 or higher
DELPHI4_UP Defined when compiling with Delphi 4 or higher
DELPHI5_UP Defined when compiling with Delphi 5 or higher
DELPHI6_UP Defined when compiling with Delphi 6 or higher
DELPHI7_UP Defined when compiling with Delphi 7 or higher
DELPHI8_UP Defined when compiling with Delphi 8 or higher
DELPHI2005_UP Defined when compiling with Delphi 2005 or higher
DELPHI9_UP Alias for DELPHI2005_UP
DELPHI10_UP Defined when compiling with Delphi 2006 or higher
DELPHI2006_UP Alias for DELPHI10_UP
DELPHI11_UP Defined when compiling with Delphi 2007 for Win32 or higher
DELPHI2007_UP Alias for DELPHI11_UP
DELPHI12_UP Defined when compiling with Delphi 2009 for Win32 or higher
DELPHI2009_UP Alias for DELPHI12_UP
DELPHI14_UP Defined when compiling with Delphi 2010 for Win32 or higher
DELPHI2010_UP Alias for DELPHI14_UP
DELPHI15_UP Defined when compiling with Delphi XE for Win32 or higher
DELPHIXE_UP Alias for DELPHI15_UP
DELPHI16_UP Defined when compiling with Delphi XE2 for Win32 and Win64 or higher
DELPHIXE2_UP Alias for DELPHI16_UP


If the compiler is KYLIX, then the following symbols are defined depending on its version:

Symbol Description
KYLIX1 Defined when compiling with Kylix 1
KYLIX2 Defined when compiling with Kylix 2
KYLIX3 Defined when compiling with Kylix 3 (Codename CORTEZ)
KYLIX1_UP Defined when compiling with Kylix 1 or higher
KYLIX2_UP Defined when compiling with Kylix 2 or higher
KYLIX3_UP Defined when compiling with Kylix 3 or higher


If the compiler is DELPHI (DELPHI only, not coupled to any C++Builder), then the following symbols are defined depending on its version:

Symbol Description
DELPHICOMPILER1 Defined when compiling with Delphi 1
DELPHICOMPILER2 Defined when compiling with Delphi 2
DELPHICOMPILER3 Defined when compiling with Delphi 3
DELPHICOMPILER4 Defined when compiling with Delphi 4
DELPHICOMPILER5 Defined when compiling with Delphi 5
DELPHICOMPILER6 Defined when compiling with Delphi 6 or Kylix 1, 2 or 3
DELPHICOMPILER7 Defined when compiling with Delphi 7
DELPHICOMPILER8 Defined when compiling with Delphi 8
DELPHICOMPILER9 Defined when compiling with Delphi 2005
DELPHICOMPILER10 Defined when compiling with Delphi Personality of BDS 4.0
DELPHICOMPILER11 Defined when compiling with Delphi 2007 for Win32
DELPHICOMPILER12 Defined when compiling with Delphi Personality of BDS 6.0
DELPHICOMPILER14 Defined when compiling with Delphi Personality of BDS 7.0
DELPHICOMPILER15 Defined when compiling with Delphi Personality of BDS 8.0
DELPHICOMPILER16 Defined when compiling with Delphi Personality of BDS 9.0
DELPHICOMPILER1_UP Defined when compiling with Delphi 1 or higher
DELPHICOMPILER2_UP Defined when compiling with Delphi 2 or higher
DELPHICOMPILER3_UP Defined when compiling with Delphi 3 or higher
DELPHICOMPILER4_UP Defined when compiling with Delphi 4 or higher
DELPHICOMPILER5_UP Defined when compiling with Delphi 5 or higher
DELPHICOMPILER6_UP Defined when compiling with Delphi 6 or Kylix 1, 2 or 3 or higher
DELPHICOMPILER7_UP Defined when compiling with Delphi 7 or higher
DELPHICOMPILER8_UP Defined when compiling with Delphi 8 or higher
DELPHICOMPILER9_UP Defined when compiling with Delphi 2005
DELPHICOMPILER10_UP Defined when compiling with Delphi 2006 or higher
DELPHICOMPILER11_UP Defined when compiling with Delphi 2007 for Win32 or higher
DELPHICOMPILER12_UP Defined when compiling with Delphi 2009 for Win32 or higher
DELPHICOMPILER14_UP Defined when compiling with Delphi 2010 for Win32 or higher
DELPHICOMPILER15_UP Defined when compiling with Delphi XE for Win32 or higher
DELPHICOMPILER16_UP Defined when compiling with Delphi XE2 for Win32 and Win64 or higher


If the compiler is BCB (or DELPHI coupled to C++Builder), then the following symbols are defined depending on its version:

Symbol Description
BCB1 Defined when compiling with C++Builder 1
BCB3 Defined when compiling with C++Builder 3
BCB4 Defined when compiling with C++Builder 4
BCB5 Defined when compiling with C++Builder 5 (Codename RAMPAGE)
BCB6 Defined when compiling with C++Builder 6 (Codename RIPTIDE)
BCB10 Defined when compiling with C++Builder Personality of BDS 4.0 (also known as C++Builder 2006) (Codename DEXTER)
BCB11 Defined when compiling with C++Builder Personality of RAD Studio 2007 (also known as C++Builder 2007) (Codename COGSWELL)
BCB12 Defined when compiling with C++Builder Personality of RAD Studio 2009 (also known as C++Builder 2009) (Codename TIBURON)
BCB14 Defined when compiling with C++Builder Personality of RAD Studio 2010 (also known as C++Builder 2010) (Codename WEAVER)
BCB15 Defined when compiling with C++Builder Personality of RAD Studio XE (also known as C++Builder XE) (Codename FULCRUM)
BCB16 Defined when compiling with C++Builder Personality of RAD Studio XE2 (also known as C++Builder XE2) (Codename PULSAR)
BCB1_UP Defined when compiling with C++Builder 1 or higher
BCB3_UP Defined when compiling with C++Builder 3 or higher
BCB4_UP Defined when compiling with C++Builder 4 or higher
BCB5_UP Defined when compiling with C++Builder 5 or higher
BCB6_UP Defined when compiling with C++Builder 6 or higher
BCB10_UP Defined when compiling with C++Builder Personality of BDS 4.0 or higher
BCB11_UP Defined when compiling with C++Builder Personality of RAD Studio 2007 or higher
BCB12_UP Defined when compiling with C++Builder Personality of RAD Studio 2009 or higher
BCB14_UP Defined when compiling with C++Builder Personality of RAD Studio 2010 or higher
BCB15_UP Defined when compiling with C++Builder Personality of RAD Studio XE or higher
BCB16_UP Defined when compiling with C++Builder Personality of RAD Studio XE2 or higher


If the compiler is BDS (DELPHI 8, C++Builder 2006 or newer), then the following symbols are defined depending on its version:

Symbol Description
BDS Defined when compiling with BDS version of dcc32.exe (Codename SIDEWINDER)
BDS2 Defined when compiling with BDS 2.0 (Delphi 8) (Codename OCTANE)
BDS3 Defined when compiling with BDS 3.0 (Delphi 2005) (Codename DIAMONDBACK)
BDS4 Defined when compiling with BDS 4.0 (Borland Developer Studio 2006) (Codename DEXTER)
BDS5 Defined when compiling with BDS 5.0 (CodeGear RAD Studio 2007) (Codename HIGHLANDER)
BDS6 Defined when compiling with BDS 6.0 (CodeGear RAD Studio 2009) (Codename TIBURON)
BDS7 Defined when compiling with BDS 7.0 (Embarcadero RAD Studio 2010) (Codename WEAVER)
BDS8 Defined when compiling with BDS 8.0 (Embarcadero RAD Studio XE) (Codename FULCRUM)
BDS9 Defined when compiling with BDS 9.0 (Embarcadero RAD Studio XE2) (Codename PULSAR)
BDS2_UP Defined when compiling with BDS 2.0 or higher
BDS3_UP Defined when compiling with BDS 3.0 or higher
BDS4_UP Defined when compiling with BDS 4.0 or higher
BDS5_UP Defined when compiling with BDS 5.0 or higher
BDS6_UP Defined when compiling with BDS 6.0 or higher
BDS7_UP Defined when compiling with BDS 7.0 or higher
BDS8_UP Defined when compiling with BDS 8.0 or higher
BDS9_UP Defined when compiling with BDS 9.0 or higher


If the compiler is DELPHI or BCB, then the following symbols are defined depending on its version:

Symbol Description
COMPILER1 Defined when compiling with Delphi 1
COMPILER2 Defined when compiling with Delphi 2 or C++Builder 1
COMPILER3 Defined when compiling with Delphi 3
COMPILER35 Defined when compiling with C++Builder 3
COMPILER4 Defined when compiling with Delphi 4 or C++Builder 4
COMPILER5 Defined when compiling with Delphi 5 or C++Builder 5
COMPILER6 Defined when compiling with Delphi 6 or C++Builder 6
COMPILER7 Defined when compiling with Delphi 7
COMPILER8 Defined when compiling with Delphi 8
COMPILER9 Defined when compiling with Delphi 9
COMPILER10 Defined when compiling with Delphi or C++Builder Personalities of BDS 4.0
COMPILER11 Defined when compiling with Delphi or C++Builder Personalities of BDS 5.0
COMPILER12 Defined when compiling with Delphi or C++Builder Personalities of BDS 6.0
COMPILER14 Defined when compiling with Delphi or C++Builder Personalities of BDS 7.0
COMPILER15 Defined when compiling with Delphi or C++Builder Personalities of BDS 8.0
COMPILER16 Defined when compiling with Delphi or C++Builder Personalities of BDS 9.0
COMPILER1_UP Defined when compiling with Delphi 1 or higher
COMPILER2_UP Defined when compiling with Delphi 2 or C++Builder 1 or higher
COMPILER3_UP Defined when compiling with Delphi 3 or higher
COMPILER35_UP Defined when compiling with C++Builder 3 or higher
COMPILER4_UP Defined when compiling with Delphi 4 or C++Builder 4 or higher
COMPILER5_UP Defined when compiling with Delphi 5 or C++Builder 5 or higher
COMPILER6_UP Defined when compiling with Delphi 6 or C++Builder 6 or higher
COMPILER7_UP Defined when compiling with Delphi 7
COMPILER8_UP Defined when compiling with Delphi 8
COMPILER9_UP Defined when compiling with Delphi Personalities of BDS 3.0
COMPILER10_UP Defined when compiling with Delphi or C++Builder Personalities of BDS 4.0 or higher
COMPILER11_UP Defined when compiling with Delphi or C++Builder Personalities of BDS 5.0 or higher
COMPILER12_UP Defined when compiling with Delphi or C++Builder Personalities of BDS 6.0 or higher
COMPILER14_UP Defined when compiling with Delphi or C++Builder Personalities of BDS 7.0 or higher
COMPILER15_UP Defined when compiling with Delphi or C++Builder Personalities of BDS 8.0 or higher
COMPILER16_UP Defined when compiling with Delphi or C++Builder Personalities of BDS 9.0 or higher


About

Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page