Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

TwoFlower

Conditional compiling

This topic is 6512 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

Hi, I''m using MSVC6 and would like to know how can I set up a define based on the configuration used. In a standard project, there is a Win32-Debug and a Win32-Release configuration, but I have created a couple of new ones for different rendering methods. The different configurations link to different libraries, but use exactly the same source files. I have set up a #define USE_RENDERERX in the header file, and used #ifdef USE_RENDERERX/#else/#endif so that only the code needed for a specific renderer is used. The trouble is, I have to change the #define line in the header file each time I want to compile a version to use a different renderer. I would much rather have this done automatically when I complie the different configurations. Can anyone help me on this please. Thanks

Share this post


Link to post
Share on other sites
Advertisement
Add the appropriate define you want to the configuration of the project you are referring to.

Project->Settings->C/C++->PreProcessor Definitions.

Regards,
Jumpster

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!