Author Topic: Problem with a global define for a particular build target.  (Read 3766 times)

Offline indigo0086

  • Almost regular
  • **
  • Posts: 150
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?
« Last Edit: June 18, 2007, 03:01:12 pm by indigo0086 »

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: Problem with a global define for a particular build target.
« Reply #1 on: June 18, 2007, 03:06:31 pm »
"DEBUG=0"
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline indigo0086

  • Almost regular
  • **
  • Posts: 150
Re: Problem with a global define for a particular build target.
« Reply #2 on: June 18, 2007, 03:25:28 pm »
doi  :idea:

Thanks.