开发者

StaticCRT(LIBCMT(D)) and DynamicCRT(MSVCRT(D)) conflict

I am developing a project which uses third party dlls and libraries. I want to build my project using static CRT (LIBCMTD) as I wish to run my application in "IBM purifier". However, the third party libraries are built using dynamic CRT(MSVCRT).

This gives linking error 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(gm开发者_开发百科time64.obj) MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: __localtime64 already defined in LIBCMTD.lib(loctim64.obj)

I have tried various linker settings. Also I gave /FORCE:MULTIPLE to the linker command line to ignore the multiple definitions and create a build. It did so, but my application stil not could run in purifier.

Is there a good way to do what I'm trying to achieve? I have no control over the 3rd party source code to control their settings.

Thanks


If it needs to be built using only the static library, you're probably hosed -- their DLL is already configured to link to the standard library dynamically, and nothing you do in building the rest of the project is going to change that (unless you can get that vendor to supply a version that links to the standard library statically).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜