Skip to main content
gamedev.net
🔒 Locked

std::string errors in release mode

Started by Tera_Dragon Apr 28, 2006 at 10:05 AM 3 replies 2.5k views
Original Post
Tera_Dragon
Tera_Dragon
When building in release mode I get the run time error: "Microsoft Visual Studio C Runtime Library has detected a fatal error in Blank.exe." for the code std::string str = "string"; What's going on here?
____________________________________________________________Programmers Resource Central
Evil Steve
Evil Steve
No idea. Can we see some source code? How do you know it's that part of the code causing the problem?
Tera_Dragon
Tera_Dragon
I just realized that I'm including in a debug version of a lib, I'll check now to see if that's the reason.
____________________________________________________________Programmers Resource Central
Evil Steve
Evil Steve
Are you passing STL objects over a DLL boundary? If so, are you using the DLL CRT? And if so, did you remember to set up the release build to use the DLL CRT too? I've managed to miss that a few times...
Tera_Dragon
Tera_Dragon
I was including a .lib file built in debug mode. The lib had included and it looks like that was causing the error. I built a release version of the lib and it solved the problem.
Is there a way to declare a class that is in a different namespace so that you don't have to include the header?
____________________________________________________________Programmers Resource Central

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.