2

I am building my application in Visual Studio 2005, using project properties ->c/c++->CodeGeneration->RuntimeLib: MTd (using static CRT library-LIBCMTD). The application is using 3rd party dlls and libs which are built in MDd(using dynamic CRT lib- MSVCRTD).

I'm getting linker errors as: MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: __mktime64 already defined in LIBCMTD.lib(mktime64.obj) MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: __gmtime64 already defined in LIBCMTD.lib(gmtime64.obj) MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: __localtime64 already defined in LIBCMTD.lib(loctim64.obj)

I cannot change the 3rd party settings. My application runs fine if I use the CRT lib dynamically, but I cannot change this.

Thanks

4

2 回答 2

3

有一个开关可以强制链接器忽略多个定义:http: //msdn.microsoft.com/en-us/library/70abkas3.aspx

于 2010-01-28T11:48:55.240 回答
2

/NODEFAULTLIB开关也可以提供帮助。

于 2010-03-19T10:03:49.353 回答