在Windows XP下编译的软件,要导入一个osip库,结果出错了,还好最后解决了。记录下来。
#include <osipparser2/osip_message.h>
#include <osipparser2/osip_parser.h>
#include <osipparser2/sdp_message.h>
#pragma comment(lib,"lib/osip_parse2_d.lib")
刚开始时,我将MFC DLL改为静态库链接,编译,出现如下结果:
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _realloc already defined in libcmt.lib(realloc.obj)
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _free already defined in libcmt.lib(free.obj)
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _malloc already defined in libcmt.lib(malloc.obj)
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _strchr already defined in libcmt.lib(strchr.obj)
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _sprintf already defined in libcmt.lib(sprintf.obj)
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _tolower already defined in libcmt.lib(tolower.obj)
MSVCR