Programming, for all ages and all languages.
Solar
Member
Posts: 7615 Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:
Post
by Solar » Wed Jun 15, 2005 11:36 am
I know it's possible to determine whether my source is compiled with VisualC++ using
But is it possible to determine whether Visual is set to compile for Debug or Release?
I could use that for some NDEBUG trickery...
Every good solution is obvious once you've found it.
zloba
Post
by zloba » Wed Jun 15, 2005 4:13 pm
try looking in project settings, it should display compiler commandline switches (under "compiler options" or "C++ options" or somesuch)
i'm sure there is some #define, like DEBUG or some variation of underscores.
(IIRC, based on MSVS 6 i used long ago)
AR
Post
by AR » Wed Jun 15, 2005 10:24 pm
This is for MSVC++6, I haven't bothered to reinstall MSVC++7 since I last reinstalled Windows, but it should work on that to.
Solar
Member
Posts: 7615 Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:
Post
by Solar » Wed Jun 15, 2005 10:38 pm
Thanks!
Every good solution is obvious once you've found it.