Visual C++: Creating a New Configuration

Creating a new configuration for compilation in Visual C++ is easy!

For example, say I want to create a new configuration that is same as Release mode, except I want assert() to be compiled. To do this:

  • Choose Project β†’ Properties and in the Properties dialog, choose Configuration Manager.
  • In the Active Solution Configuration dropdown, choose New.
  • In the New Solution Configuration dialog that pops up, give the new configuration a name (ReleaseWithAssert for example) and choose an existing configuration whose settings to copy from. For our example, I would choose to copy from Release. This creates a new configuration named ReleaseWithAssert with all the settings from the Release configuration.
  • Go into the new configuration settings and make the changes you want. For example, I typically enable assertions in Release mode by removing the definition of the NDEBUG preprocessor directive.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.