Creating macro for specific builds

Started by
1 comment, last by lordikon 13 years, 9 months ago
I have a program with three build configurations (debug, release, and final). I have parts of code that are for debugging purposes only, but I will also need to test that same code in release mode, however, I don't want it in the final build. How do I setup a macro definition to only be defined during specific build configurations?

Example:

#ifndef _FINAL
// Include this stuff if we're not in the 'final' build config
#endif //!_FINAL

EDIT: Oh, and I'm using Visual Studio 2010 C++ Express.
Advertisement
Open the Project menu and choose Properties; select the appropriate configuration and click Configuration Properties on the left pane. Under there you should find the C/C++ section which includes the subsection Preprocessor. Add any defines you like in the Preprocessor Definitions box, delimited by semicolons.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

Awesome, thank you.

This topic is closed to new replies.

Advertisement