Sign in to follow this  
Raeldor

basic_string already defined when linking my lib with MFC

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this