在vc里嵌入m文件翻译过来的c++代码,debug状态下可以用了,但release时报错:
nafxcw.lib(afxmem.obj) : warning LNK4006: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in MSVCRT.lib(MSVCRT.dll); second definition ignored
nafxcw.lib(afxmem.obj) : warning LNK4006: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in MSVCRT.lib(MSVCRT.dll); second definition ignored
这两个警告应该是函数库冲突引起的吧?我没办法解决就在工程里设置了force file output,结果原来的err变成warning了,
nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argv
nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc
nafxcw.lib(apphelp.obj) : error LNK2001: unresolved external symbol __mbctype
nafxcw.lib(filelist.obj) : error LNK2001: unresolved external symbol __mbctype
nafxcw.lib(timecore.obj) : error LNK2001: unresolved external symbol __mbctype
Release/newdata.exe : warning LNK4088: image being generated due to /FORCE option; image may not run
LINK : warning LNK4089: all references to "SHELL32.dll" discarded by /OPT:REF
这里一共5处引起了link 2001错误,有的资料说是相关的库没包含进来,怎么确认对应那个库呢?
还有没有别的原因造成这些错误呢?望高手指教
nafxcw.lib(afxmem.obj) : warning LNK4006: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in MSVCRT.lib(MSVCRT.dll); second definition ignored
nafxcw.lib(afxmem.obj) : warning LNK4006: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in MSVCRT.lib(MSVCRT.dll); second definition ignored
这两个警告应该是函数库冲突引起的吧?我没办法解决就在工程里设置了force file output,结果原来的err变成warning了,
nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argv
nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc
nafxcw.lib(apphelp.obj) : error LNK2001: unresolved external symbol __mbctype
nafxcw.lib(filelist.obj) : error LNK2001: unresolved external symbol __mbctype
nafxcw.lib(timecore.obj) : error LNK2001: unresolved external symbol __mbctype
Release/newdata.exe : warning LNK4088: image being generated due to /FORCE option; image may not run
LINK : warning LNK4089: all references to "SHELL32.dll" discarded by /OPT:REF
这里一共5处引起了link 2001错误,有的资料说是相关的库没包含进来,怎么确认对应那个库呢?
还有没有别的原因造成这些错误呢?望高手指教
解决方案 »
- 界面输入字符点确定输出字符
- VC使用OCI访问oracle 10g,Sql正确,却取不到数据
- error C2859: g:\practice\synchronization_a24\debug\vc60.pdb is not the pdb file that was used when this precompiled header was c
- MFC全屏有黑框,求大神解答
- 面向连接的SOCKET通讯,C/S模式,服务器端可以bind某一个地址,端口。那么客户端连接的是这个地址、端口,但客户端的机器上使用的是哪一
- 关于 “无法对DAO/Jet db引擎进行初始化”的提示,请各位大虾帮忙!!!急急急,在线等待
- 看pdg文件是用什么阅读器?
- vxd的数据结构从何可以知道?MSDN,BOOK(书名)感激万分
- 如何取应用程序的版本号?
- 使用SDK,如何制作浮动按钮?
- 编译时老是说我变量重定义!请高手帮忙!
- 各位救救我,如何用vc++获取网页内容?
Catagory=Code Generation
选择Multi Dll或Link
Catagory=Input
Ingore Libs加nafxcw.lib看看
use MFC as a shared lib