Code::Blocks Forums

User forums => Help => Topic started by: indigo0086 on June 18, 2007, 02:56:12 pm

Title: Problem with a global define for a particular build target.
Post by: indigo0086 on June 18, 2007, 02:56:12 pm
Basically in a simple library I made I am going to have it output to the debug console if "DEBUG" has been defined.  ex:
Code
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?
Title: Re: Problem with a global define for a particular build target.
Post by: TDragon on June 18, 2007, 03:06:31 pm
"DEBUG=0"
Title: Re: Problem with a global define for a particular build target.
Post by: indigo0086 on June 18, 2007, 03:25:28 pm
doi  :idea:

Thanks.