简体   繁体   中英

LNK2038 - Linking Issue in VS2012

I get the following error in relation with a live555 library:

error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug in main.obj

I changed the Runtime Library in the Project Settings and main.cpp-Settings to 'Multithreaded-DLL (/MD)'.

However, I still get the error. It's like it doesn't change the Runtime Library even though I changed it in the settings.

Do you have an idea why?

I noticed that the error is gone when I remove include <string> . How can that be related?

I'm having the same problem with VS2013. It's maddening and I'm surprised to see that no one else has asked the question before you..

I don't have a complete answer, but removing the defined-by-default "_DEBUG" preprocessor macro got rid of the errors for me. I assume that there's a pragma or something in the MS standard library headers that triggers when _DEBUG is defined and somehow forces the use of debug versions regardless of the command line.

Just another little landmine the VS team put in there to keep our lives interesting, I suppose. Thanks, VS team.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM