我用动态链接库把cximage编译的.lib .dll文件加载到工程目录下后,Link也加了.lib文件,
程序可以顺利编译,但在链接时出现了以下错误,请问是怎么回事啊???好像是定义冲突了啊。
Linking...
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _fclose already defined in LIBCD.lib(fclose.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _calloc already defined in LIBCD.lib(dbgheap.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _free already defined in LIBCD.lib(dbgheap.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _sprintf already defined in LIBCD.lib(sprintf.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _malloc already defined in LIBCD.lib(dbgheap.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _fflush already defined in LIBCD.lib(fflush.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _realloc already defined in LIBCD.lib(dbgheap.obj)
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _fclose already defined in LIBCD.lib(fclose.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _calloc already defined in LIBCD.lib(dbgheap.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _free already defined in LIBCD.lib(dbgheap.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _sprintf already defined in LIBCD.lib(sprintf.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _malloc already defined in LIBCD.lib(dbgheap.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _fflush already defined in LIBCD.lib(fflush.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _realloc already defined in LIBCD.lib(dbgheap.obj); second definition ignored
Creating library Debug/WinMain.lib and object Debug/WinMain.exp
LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib "MSVCRTD" conflicts with use of other libs; use /NODEFAULTLIB:library
Debug/WinMain.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.
程序可以顺利编译,但在链接时出现了以下错误,请问是怎么回事啊???好像是定义冲突了啊。
Linking...
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _fclose already defined in LIBCD.lib(fclose.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _calloc already defined in LIBCD.lib(dbgheap.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _free already defined in LIBCD.lib(dbgheap.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _sprintf already defined in LIBCD.lib(sprintf.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _malloc already defined in LIBCD.lib(dbgheap.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _fflush already defined in LIBCD.lib(fflush.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _realloc already defined in LIBCD.lib(dbgheap.obj)
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _fclose already defined in LIBCD.lib(fclose.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _calloc already defined in LIBCD.lib(dbgheap.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _free already defined in LIBCD.lib(dbgheap.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _sprintf already defined in LIBCD.lib(sprintf.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _malloc already defined in LIBCD.lib(dbgheap.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _fflush already defined in LIBCD.lib(fflush.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _realloc already defined in LIBCD.lib(dbgheap.obj); second definition ignored
Creating library Debug/WinMain.lib and object Debug/WinMain.exp
LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib "MSVCRTD" conflicts with use of other libs; use /NODEFAULTLIB:library
Debug/WinMain.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.
解决方案 »
- 如何将MFC中获取的地址字符串正确的插入到MYSQL中去
- 关于COleVariant的问题
- 求救,unhandled exception 错误。
- TabControl有两页,第一页中可以鼠标拖放一个TreeControl,但第二页怎么就方不上了呢?
- 帮忙看看这段代码。。谢谢了。。
- 如何取得对话框中某个按钮控件的位置?急!!!
- 怎样动态创建窗口
- edit box 是不是不能自动换行?
- 编一函数,将一字符串转换成它的ASCII码的字符串,如"123"变成"31 32 33",如何?反之,又怎样?
- SOS,请求高手帮助!!如何在List Box中的OnCompareItem实现排序?
- 设置背透明有什么用?
- 真是搞不懂GetMenuItemInfo这个函数!麻烦大家看看!
Debug -> /MDd
Release -> /MD
Creating library Debug/WinMain.lib and object Debug/WinMain.exp
WinMain.obj : error LNK2001: unresolved external symbol "public: int __thiscall CxImage::Destroy(void)" (?Destroy@CxImage@@QAEHXZ)
Debug/WinMain.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.WinMain.exe - 2 error(s), 0 warning(s)