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

后端 未结 4 1230
我寻月下人不归
我寻月下人不归 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 20:54

    Make sure the option you select for Runtime Libary linking is the same for every project and library. Project Properties -> Configuration Properties -> C/C++ -> Code Generation -> Runtime Library -> "Multi-threaded" / "Multi-threaded DLL" / ...

    My issue was all of my C++ projects were "Multi-threaded" but I was referencing fortran modules that were "Multi-threaded DLL"

提交回复
热议问题