[Lazarus] where do I put project wide conditional define?

Mattias Gaertner nc-gaertnma at netcologne.de
Tue Apr 19 13:24:25 CEST 2016


On Tue, 19 Apr 2016 19:17:05 +0800
Dennis <dec12 at avidsoft.com.hk> wrote:

> I some of my units, I have :
> 
> uses classes,
> {$IFDEF  USE_XYZ}
>     certain_unitXYZ
> {$ENDIF};
> 
> 
> Where do I put
> {$DEFINE USE_XYZ}
> 
> so that when I rebuild the project, fpc will see USE_XYZ is defined.
> 
> Putting in in the project .lpr  does not work

Add -dUse_XYZ to 
Project / Project Options / Compiler Options / Custom Options

Mattias




More information about the Lazarus mailing list