On 16.02.2017 12:16, Graeme Geldenhuys via Lazarus wrote:
On 2017-02-16 10:54, Graeme Geldenhuys via Lazarus wrote:
The IDE shows that CodeTools knows about the FreeBSD variable, but the
code doesn't seem to work,


Doing the following though does work, but it means I have to duplicate
all $DEFINE lines in two places, which I don't really want to do.


{$IFDEF LCLGTK2}
   {$IFDEF Linux}
     {$DEFINE something}
     ...snip.
   {$ENDIF}
   {$IFDEF FreeBSD}
     {$DEFINE something}
     ...snip.
   {$ENDIF}
{$ENDIF}

Well, you mixed up DEFINED and DECLARED macros. The following should work:

{$IFDEF LCLGTK2}
  {$IF DEFINED(Linux) or DEFINED(FreeBSD)}
   {$define something}
  {$endif}
{$endif}
Ondrej
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to