#if DEBUG .. #endif

  • Thread starter Thread starter Zytan
  • Start date Start date
Z

Zytan

When I do this, all code in the middle turns gray. I assume this is
because DEBUG is not defined. But, I thought it was for debug mode.
Is there something I am missing, or do people manually add DEBUG to
the debug mode compilation? How do I tell the IDE which mode I am
currently in (debug / release), like VC++ allows me to (it says in a
toolbar which compilation mode you are currently in)? Perhaps I am
merely in release mode, and thus DEBUG is not defined.

Zytan
 
When you change the Build Configuration of your project from Release to
Debug, the grayed out section should come alive. Check your configuration
properties to make sure that the DEBUG symbol is set to be used.
Peter
 
When you change the Build Configuration of your project from Release to
Debug, the grayed out section should come alive.

Ok, so how do I do that?
Check your configuration
properties to make sure that the DEBUG symbol is set to be used.

I see under Project -> Properties... -> Build -> General, that "Define
DEBUG constant" is not selected. But, I assume by selecting this, I
am not choosing a debug build over a release build. In VC++, there
were multipl build configurations, with two as the default: debug and
release, where the debug automatically had DEBUG #defined, and release
did not (among a bunch of other things that normally distinguish the
two, such as code optimization, etc.)

Zytan
 
Back
Top