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? ? ?