Skip to main content
gamedev.net
🔒 Locked

problem - std::vector + VC++ 2005 + debug mode

Started by etothex 1 reply 1.2k views
Original Post
etothex
etothex
So I've stumbled across the same problem as this guy SDL apps, according to the documentation, link with the Multithread DLL in Visual C++ 2005. So, I did that for my application. Now, if I try to use std::vector, I get: unresolved external symbol __imp___CrtDbgReportW. I'm in debug mode, with it linked to multithread dll instead of multithread debug dll. Herein lies the problem: CrtDbgReportW() is a function in the debug version of the CRT DLL, but not in the regular version. Apparently it is used somehow when instantiating std::vector in debug mode. But std::vector, because the program is still in debug mode (except for the CRT selection) is still trying to use the debug CRT - it hasn't "gotten the memo" that it shouldn't use it. So - what do I do? Preferably, I would just use the multithread debug DLL CRT in debug mode, but that's not what SDL uses. I'm figuring I'll just go ahead and recompile SDL completely :(
mrbastard
mrbastard
prebuilt SDL will play fine with the multithreaded debug dll in vc6 and 2003, so I'd guess it will work in 2005. You may have to set the linker to ignore some specific libs, but it will most likely tell you which ones when you try linking for the first time.

I use a bunch of libraries that use different runtime versions. It's messy, but it works and doesn't require recompiling the librarys.

I ignore LIBCD,LIBC,MSVCRT,LIBCMTD,LIBCMT in my debug configuration to ensure that only MSVCRTD is linked against.
[size="1"]
Evil Steve
Evil Steve
The latest SDL works fine with VC 2005. I tried it 3 days ago...

Topic Locked

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

Sign in to reply to this topic.