[Lazarus] Conditional define via Build mode?

Reinier Olislagers reinierolislagers at gmail.com
Fri Jan 6 16:01:50 CET 2012


Hi all,

I'm trying to set a conditional symbol depending on build mode. I've got
Debug and Release build modes defined.

In code, I can do this:
  {$DEFINE DEBUG}
  {$IFDEF DEBUG}
  writeln('Debug: ' + Message);
  {$ENDIF DEBUG}

How can I set DEBUG only when in Debug build mode? I had a look at the
wiki page and the Project Options, Build Macros but I'm a bit lost.

I just added DEBUG:=1 to the Conditionals screen... but that doesn't
seem to do the trick... I've tried playing with adding macros but must
just be missing something elementary...

Thanks,
Reinier




More information about the Lazarus mailing list