[Lazarus] $IF for Linux and FreeBSD platforms?

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Thu Feb 16 11:54:44 CET 2017


Hi,

Is the following allowed in LCL specific code?


{$IFDEF LCLGTK2}
  {$IF declared(Linux) or declared(FreeBSD)}
   {$define something}
  {$endif}
{$endif}


The IDE shows that CodeTools knows about the FreeBSD variable, but the
code doesn't seem to work, because later in the code the "something"
compiler define seems undefined during compilation - yet the IDE
correctly shades the {$IFDEF something} wrapped code as active.


Regards,
  Graeme

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp


More information about the Lazarus mailing list