cplusplus
CPPUINT在VC6的链接错误
上一篇 /
下一篇 2011-08-07 08:00:56
/ 个人分类:CPPUNIT
http://topic.csdn.net/t/20050926/15/4294648.html
LINK : warning LNK4098: defaultlib "MSVCRT " conflicts with use of other
libs; use /NODEFAULTLIB:library
BondBatman.obj : error LNK2001: unresolved external symbol _WSACleanup@0
BondBatman.obj : error LNK2001: unresolved external symbol _WSAGetLastError@0
BondBatman.obj : error LNK2001: unresolved external symbol _accept@12
BondBatman.obj : error LNK2001: unresolved external symbol _WSAStartup@8
spIPCComm.obj : error LNK2001: unresolved external symbol _closesocket@4
spIPCComm.obj : error LNK2001: unresolved external symbol _connect@12
spIPCComm.obj : error LNK2001: unresolved external symbol _inet_addr@4
spIPCComm.obj : error LNK2001: unresolved external symbol _htons@4
spIPCComm.obj : error LNK2001: unresolved external symbol _socket@12
spIPCComm.obj : error LNK2001: unresolved external symbol _listen@8
spIPCComm.obj : error LNK2001: unresolved external symbol _bind@12
spIPCComm.obj : error LNK2001: unresolved external symbol _recv@16
spIPCComm.obj : error LNK2001: unresolved external symbol _send@16
spIPCComm.obj : error LNK2001: unresolved external symbol _select@20
nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argv
nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc
nafxcwd.lib(filelist.obj) : error LNK2001: unresolved external symbol __mbctype
nafxcwd.lib(timecore.obj) : error LNK2001: unresolved external symbol __mbctype
nafxcwd.lib(apphelp.obj) : error LNK2001: unresolved external symbol __mbctype
Debug/BondBatman.exe : fatal error LNK1120: 17 unresolved externals
Error executing link.exe.
BondBatman.exe - 20 error(s), 1 warning(s)
你的工程的引用的lib里面,有没有MSVCRT.LIB?
把Ws2_32.lib加入到库的引用上
后面几个错误解决可能麻烦点, 就是msvcrt libcmt之间的冲突
把msvcrt.lib libcmt.lib 按照顺序加入到库引用的前面, linker选项加上 /FORCE:MULTIPLE
如果还有错误再说,
每次遇到这个总要试几次才行~
没有,怎么引用啊
怎么加 "linker选项加上 /FORCE:MULTIPLE "啊?
一切OK拉!多谢,开始散分
以上是搜索来的。
只加了libcmt.lib,linker的libcmt.lib前面加上 /FORCE:MULTIPLE,就出现以下的
LINK : warning LNK4075: ignoring /INCREMENTAL due to /FORCE specification
nafxcwd.lib(afxmem.obj) : warning LNK4006: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in libcmt.lib(delete.obj); second definition ignored
LINK : warning LNK4098: defaultlib "msvcrtd.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
Debug/UnitTest.exe : warning LNK4088: image being generated due to /FORCE option; image may not run
UnitTest.exe - 0 error(s), 0 warning(s)
错误出现ASSERT(AfxGetResourceHandle()!=NULL),不知为何
对话框无法生成
把MFC静态链接库改成MFC动态链接库即可
现在找不到测试对象的成员函数,怎么办
少了这一句,找不到测试对象的方法了
//注册一个测试suite到一个指定的TestFactory工厂中CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(CPlusTestCase, CPlusTestCase::GetSuiteName());
收藏
举报
TAG:
链接错误