在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错误,有的资料说是相关的库没包含进来,怎么确认对应那个库呢?
还有没有别的原因造成这些错误呢?望高手指教