> Is it possible to check the active solution configuration
> (debug, release or some user defined) at compile time
> using for example preprocessor directives?
While it is not exactly what you asked, do you know that an easy thing to do
is to check for the presence of debug options is to use something like
#ifdef DEBUG
// ...
#endif
You might want to look at the "Command Line" options under the C++ section
of your project's properties. The options that start with /D are the ones
which set preprocessor symbols.
I would guess that the automation/macro support in the compiler would allow
you to get the information you seek but to be honest that's just a guess as
I have never set out to look for it.
Regards,
Will
Michael - 28 Jun 2004 10:56 GMT
Well, I've already thought of this solution. I've seen something like
IF CONFIG = "Debug"
END IF
posted in other newsgroups but it seems like it only works with VB. I guess I'll have to use the proposed solution.
Regards,
Michael
> > Is it possible to check the active solution configuration
> > (debug, release or some user defined) at compile time
[quoted text clipped - 17 lines]
> Regards,
> Will
Steve McLellan - 28 Jun 2004 11:11 GMT
It's as good a solution as any. Stick a Preprocessor Define (in the Project
configs) for each of your configs. I think DEBUG is automaticaly defined for
Debug builds, and it's easy to add some more for other configurations.
Steve
> Well, I've already thought of this solution. I've seen something like
>
[quoted text clipped - 28 lines]
> > Regards,
> > Will