Jump to content
  • Advertisement
Sign in to follow this  
lordikon

Creating macro for specific builds

This topic is 2905 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!