How can I resolve this link error in Visual Studio (LNK2005)?

后端 未结 4 1206
我寻月下人不归
我寻月下人不归 2021-01-05 20:50

I keep having linker errors of the following form:

libcmtd.dll msvmrtd.dll some element(ex: _mkdir ) already defined...

4条回答
  •  广开言路
    2021-01-05 21:03

    Your problem is that you're linking with two files providing the same symbol.

    You haven't provided the real error message so we can't tell you exactly what the problem is but it's likely to be that you're linking with libraries from two different versions of Visual Studio.

    There are also solutions available by searching the web (I assume you did this but just missed the articles in question :-) that suggest you can fix the problem by changing the project options from "Multi-threaded Debug(/MTd)" to "Multi-threaded Debug DLL (/MTD)" but I haven't looked in to this.

    Please post the complete error so we can offer more targeted assistance.

提交回复
热议问题