Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Compiler im sourcode steuern. OS abhängig compilieren (https://www.delphipraxis.net/123297-compiler-im-sourcode-steuern-os-abhaengig-compilieren.html)

mojo777 30. Okt 2008 10:27


Compiler im sourcode steuern. OS abhängig compilieren
 
Hallo,
ich würde gerne in meine Anwendung eine Fallunterscheidung zwischen delphi und lazarus einbauen.

Es soll ungefähr so aussehen:
Delphi-Quellcode:
{$if delphi}
code was in delphi compiliert werden soll}
{$endif}
{$if lazarus}
code für lazarus
{$endif}
Kann mir da vielleicht jemand kurz mit tips helfen?

danke!

Prototypjack 30. Okt 2008 10:33

Re: Compiler im sourcode steuern. OS abhängig compilieren
 
Moin,

Ich habe da noch was dunkel im Hinterkopf (kann aber auch totaler Blödsinn sein, müsste man testen ;) ):

Delphi-Quellcode:
{$IFDEF FPC}
  FreePascal Compiler (Lazarus)
{$ELSEIF}
  {$IFDEF WIN32}
    Delphi (nicht Kylix, da Win 32!)
  {$ENDIF}
{$ENDIF}
Ich hoffe es klappt!

Grüße,
Max

mojo777 30. Okt 2008 11:26

Re: Compiler im sourcode steuern. OS abhängig compilieren
 
super danke! :)


Alle Zeitangaben in WEZ +1. Es ist jetzt 17:15 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz