Reputation: 131525
I'm using Eclipse CDT to write some C++ code (on Win7 with Cygwin). I naturally want different/additional behavior when debugging, and use #ifdef DEBUG
occasionally. Unfortunately, it seems that I somehow have DEBUG
defined in Release build configuration as well.
How can I get Eclipse CDT to not define DEBUG?
Upvotes: 1
Views: 2602
Reputation: 493
#undef DEBUG
that directive will undefine things.
edit: I'm aware you probably just want this for a specific IDE that's adding the define outside of the source files, finding that option in IDE settings is a better way to go about it, but this will also work if it's in a header which is included by all project files.
Upvotes: 1