• Advertisement
Sign in to follow this  

basic_string already defined when linking my lib with MFC

This topic is 4491 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 All, I have split my game engine into it's own library file now, and it compiles great. I also linked it in with my win32 test frame and that also works great. However, when I try and link it to my MFC editor application I get errors about basic_string already defined. I am guessing this is caused by the class being defined in the header file <string> and present in both the MFC application and my .lib file? First question is, how do I fix this? Second question is, if this class is defined in the header file, why does the linker not complain when two CPP files in the same project link together? Thanks!

Share this post


Link to post
Share on other sites
Advertisement
I think I found the problem.

It seems to stem from mixing single-threaded and multi-threaded runtime libraries. Can anyone explain in more detail what is going on here?

Thanks

Share this post


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

  • Advertisement