Jump to content
  • Advertisement


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


Conditional compiling

This topic is 6594 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
Add the appropriate define you want to the configuration of the project you are referring to.

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


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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!