[Programming] Programming Language (C ++) - Compile - MSVCRTD.LIB LIBCMTD.LIB's sequence caused by compilation errors!

xiaoxiao2021-03-06  35

When compiling JXTA-C, I found an interesting phenomenon, that is, the LNK2005 error occurs.

Linking ... MSVCRTD.LIB (MSVCRTD.dll): error LNK2005: __errno already defined in LIBCMTD.LIB (dosmap.obj) MSVCRTD.LIB (MSVCRTD.dll): error LNK2005: _free already defined in LIBCMTD.LIB (dbgheap. obj) MSVCRTD.LIB (MSVCRTD.dll): error LNK2005: _realloc already defined in LIBCMTD.LIB (dbgheap.obj) MSVCRTD.LIB (MSVCRTD.dll): error LNK2005: _malloc already defined in LIBCMTD.LIB (dbgheap.obj) MSVCRTD.LIB (MSVCRTD.DLL): Error LNK2005: _Memmove Already Defined in libcmtd.lib (memmove.obj)

But carefully view the link library used, there is no problem, there is no way, I have to find a library of a library. Later, I found that the original order of the two libraries of MSVCRTD.LIB libcmtd.lib caused, the correct order should be

MSVCRTD.LIB LIBCMTD.LIB instead of libcmtd.lib msvcrtd.lib

It's unknown for what reason? ? ?

转载请注明原文地址:https://www.9cbs.com/read-67214.html

New Post(0)