Jump to content
  • Advertisement
Sign in to follow this  
Erzengeldeslichtes

debug/release libs

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

In most of my applications, all I link to is "somelib.lib" (like "user32.lib") in both my release and debug mode. But now I created my own, and I have to use the lib compiled in release mode with the release mode exe, and the lib compiled in debug mode in the debug mode exe. If I use, say, the release mode lib in debug mode exe, it crashes. Sometimes. Usually having to do with an STL class. Why don't I have to do this with any of Microsoft's libs, and how do I make my lib work like that?

Share this post


Link to post
Share on other sites
Advertisement
Simple. Don't use the STL in your lib. STL code is different in debug and release - the actual class definitions are different, so the library files are not compatible.

A more realistic solution would involve setting up your main project to link with different versions of your libraries depending on the build mode. Your IDE can do this. It may also let you set up build dependencies, so that it always makes sure the libraries are up to date before compiling the main project.

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!