News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Problem with a global define for a particular build target.

Started by indigo0086, June 18, 2007, 02:56:12 PM

Previous topic - Next topic

indigo0086

Basically in a simple library I made I am going to have it output to the debug console if "DEBUG" has been defined.  ex:

if(DEBUG)
   cout << "debug message << endl;


I went to the compiler settings tab for the debug build and in the #defines, sub-menu I entered "DEBUG" (without the quotes).  The code executes fine if I'm on a debug build, but when I go to the release build it gives me the "DEBUG not defined" error.  How am I able to bring the DEBUG value in the scope of a release build but have it execute as false?

TDragon

[url="https://jmeubank.github.io/tdm-gcc/"]https://jmeubank.github.io/tdm-gcc/[/url] - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)