From cfbf0943be5d95b5b2aeccfa4149bc943fc1bc3c Mon Sep 17 00:00:00 2001 From: tobigun Date: Thu, 21 Feb 2008 11:07:21 +0000 Subject: Delphi evaluates every $IF-directive even if it is disabled by a surrounding $IF or $IFDEF so the follwing will give you an error in delphi: {$IFDEF FPC}{$IF (FPC_VERSION > 2)}...{$IFEND}{$ENDIF} The reason for this error is that FPC_VERSION is not a valid constant. To avoid this error, i defined dummy-consts for delphi. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@876 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UConfig.pas | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Game/Code/Classes/UConfig.pas b/Game/Code/Classes/UConfig.pas index a7b0f328..f850b00f 100644 --- a/Game/Code/Classes/UConfig.pas +++ b/Game/Code/Classes/UConfig.pas @@ -130,6 +130,17 @@ const // (PPC_VERSION_MINOR * VERSION_MINOR) + // (PPC_VERSION_RELEASE * VERSION_RELEASE); + {$IFDEF Delphi} + // Delphi evaluates every $IF-directive even if it is disabled by a surrounding + // $IF or $IFDEF so the follwing will give you an error in delphi: + // {$IFDEF FPC}{$IF (FPC_VERSION > 2)}...{$IFEND}{$ENDIF} + // The reason for this error is that FPC_VERSION is not a valid constant. + // To avoid this error, we define dummys here. + FPC_VERSION = 0; + FPC_RELEASE = 0; + FPC_PATCH = 0; + {$ENDIF} + {$IFDEF LAZARUS} LAZARUS_VERSION = (LAZARUS_VERSION_MAJOR * VERSION_MAJOR) + (LAZARUS_VERSION_MINOR * VERSION_MINOR) + -- cgit v1.2.3