error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj

前端 未结 20 1125
耶瑟儿~
耶瑟儿~ 2020-11-29 20:36

I have read a lot of solutions to my problem but none helped. I tried clean, rebuild. Reinstalled visual 2010 and change from professional to ultimate. But still I dont know

20条回答
  •  被撕碎了的回忆
    2020-11-29 21:25

    I make a little update on this issue, as I just had the same error today on an application which is linking against a static lib, after I migrated the old Visual 6 project to Visual Studio 2012.

    In my case the error was that I mistakenly compiled the Release version of the static lib with /MDd instead of /MD, whereas the application is /MD in release. Setting the correct /MD in the static lib project solved the issue.

    This is done in Project properties

    • Select Configuration Properties / C C++ / Code Generation in the tree
    • and the option Runtime Library set to the same on all your dependencies projects and application.

提交回复
热议问题