Delphi What Conditional Symbols Are Defined In Kylix?

Сomentários

Transcrição

Delphi What Conditional Symbols Are Defined In Kylix?
Delphi
What Conditional Symbols Are Defined In Kylix?
Kylix defines a number of conditional symbols for use in conjunction with conditional
compilation directives. However, to put them into context the following table
lists all the conditional symbols defined in all versions of Kylix, Delphi and
the Delphi compiler incorporated in C++Builder.
Conditional
Defined
Meaning
In Symbol
compiling
CPU386
all
versionsonofan
Kylix
80386
andor
Delphi
better
compiler
VER80
Delphi
1 version 8
compiler
VER90
Delphi
2 version 9
compiler version
VER93
C++Builder
1
9.3
compiler
VER100
Delphi
3 version 10
compiler version
VER110
C++Builder
3
11
compiler
VER120
Delphi
4 version 12
compiler version
VER125
C++Builder
4
12.5
compiler version 135
VER130
Delphi/C++Builder
Delphi/C++Builder
compiler
VER140
version 146, Kylix 1, 2
&3
compiler
VER150
Delphi
7 version 15
compiler
VER160
Delphi
forversion
.NET 16
Seite 1 / 4
(c) 2017 Shivan <[email protected]> | 2017-01-13 13:18
URL: http://www.shivi.de/eddb/index.php?action=artikel&cat=3&id=1895&artlang=de
Delphi
C++Builder
Delphi
BCB
code being compiled
from within C++Builder
C++Builder
Delphi
GAMMA_TEST
code4being
(this was
compiled
a bug
fromshould
and
a pre-release
not be defined
(gammain
test)shipping
any
product
product)
compiling
WINDOWS
Delphi
1 for Win16 platform
32-bit Delphi
compiling
WIN32
for versions
Win32 platform
from 2
onwards
Delphi 6 and
compiling
MSWINDOWS
for later
any Windows
platform
compiling for any Linux platform
LINUX
Kylix
Kylix
compiling
LINUX32
for 32-bit Linux
platform
Kylix
compiling
POSIX
for a
POSIX-compliant OS
Kylix
compiling
POSIX32
for a 32-bit
POSIX-compliant OS
Kylix when
position
PIC
independent
compiling code
shared
(PIC) being generated
objects
Kylix
compiling
ELF
an ELF format
executable file
Kylix
program
PC_MAPPED_EXCEPTIONS
counter based
exception handling, as opposed
to OS-based exception
handling
Seite 2 / 4
(c) 2017 Shivan <[email protected]> | 2017-01-13 13:18
URL: http://www.shivi.de/eddb/index.php?action=artikel&cat=3&id=1895&artlang=de
Delphi
compiling
DECLARE_GPL
Kylix
Opena Edition
GPL application
Delphi
Common
CIL
for .NET
Intermediate
Language (CIL) code being
generated
Delphi
.NET managed
MANAGEDCODE
for .NET code being
generated
Delphi/C++Builder
conditional
CONDITIONALEXPRESSIONS
directives
6 and
support
later,
expression
Delphi
for .NET
evaluation
and Kylix
With these you can write conditionally compiled code like:
{$IFDEF LINUX}
//do Linux-specific code here
{$ENDIF}
{$IFDEF MSWINDOWS}
//do WIndows-specific code here
{$ENDIF}
However, as of Kylix 1 and Delphi 6 you can also take advantage of some new
constants defined in the RTL in conjunction with a more flexible form of consitional
compilation. The following table shows the new predefined constants that you
may want to use.
RTLVersion value value
Product
CompilerVersion
Kylixdefined
not
14.00
1
Delphi 6.00
14.01
14.10
Delphi 6.01
14.01
14.11
Delphi 6.02
14.01
14.20
C++Builder 6
14.01
14.20
Seite 3 / 4
(c) 2017 Shivan <[email protected]> | 2017-01-13 13:18
URL: http://www.shivi.de/eddb/index.php?action=artikel&cat=3&id=1895&artlang=de
Delphi
Kylix 2
14.10
14.20
Kylix 3
14.50
Delphi 7
15.00
Delphi
not
16.00
defined
for .NET Preview Edition
You can use these constants to more easily identify if the compiler is later
or earlier than a specific release. You do this with the help of the intrinsic
Declared function, which identifies if a specified
constant has been declared. For example:
{$IFDEF CONDITIONALEXPRESSIONS}
{$IF Declared(RTLVersion) and RTLVersion
{$IFEND}
{$ENDIF}
{$MESSAGE ERROR 'Oldest permitted compilers are Delphi 6 with Update Pack 1 (Delphi 6.01) or Kylix 2'}
If you know you will always be compiling with tools later than Delphi
5 (i.e.
Delphi 6 or Kylix) then there is no need to wrap these new
directives in a check
for CONDITIONALEXPRESSIONS. Also, you can you can
use another instrisic function, Defined, which checks
if a specified conditional symbol has been defined (much like $IFDEF
does):
{$IF not Defined(LINUX)}
{$MESSAGE ERROR 'This is Linux-only code'}
{$ELSEIF Declared(RTLVersion) and RTLVersion
{$IFEND}
{$MESSAGE ERROR 'Oldest permitted compiler is Kylix 2'}
Click here to go back to the top of this page
Eindeutige ID: #0
Verfasser: Markus Stein
Letzte Änderung der FAQ: 2006-02-21 22:22
Seite 4 / 4
(c) 2017 Shivan <[email protected]> | 2017-01-13 13:18
URL: http://www.shivi.de/eddb/index.php?action=artikel&cat=3&id=1895&artlang=de
Powered by TCPDF (www.tcpdf.org)

Documentos relacionados