vc6.0 链接错误 ' libcp.lib error LNK2001 unresolved external symbol ' 的处理

本文详细解析了在使用VC6.0编译器进行多线程项目构建时遇到的链接错误'libcp.lib error LNK2001 unresolved external symbol',并提供了具体的解决步骤。主要原因是程序引用了多线程库,但链接器默认使用了单线程库,解决方法是将链接选项更改为多线程库(/MT)。

vc6.0 链接错误' libcp.lib error LNK2001 unresolved external symbol '的处理

在编译链接(release)时产生如下错误:

libcp.lib(locale.obj) : error LNK2001: unresolved external symbol _sprintf
libcp.lib(wlocale.obj) : error LNK2001: unresolved external symbol _sprintf
libcp.lib(xlocale.obj) : error LNK2001: unresolved external symbol _sprintf
libcp.lib(xlocale.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler
libcp.lib(wiostrea.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler
libcp.lib(locale0.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler
libcp.lib(locale.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler
libcp.lib(wlocale.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandle
libcp.lib(iostream.obj) : error LNK2001: unresolved external symbol _fclose
libcp.lib(wiostrea.obj) : error LNK2001: unresolved external symbol _fclose
libcp.lib(fiopen.obj) : error LNK2001: unresolved external symbol _fclose
libcp.lib(xlocale.obj) : error LNK2001: unresolved external symbol _memmove
libcp.lib(wiostrea.obj) : error LNK2001: unresolved external symbol _memmove
libcp.lib(locale0.obj) : error LNK2001: unresolved external symbol _memmove
libcp.lib(locale.obj) : error LNK2001: unresolved external symbol _memmove
libcp.lib(wlocale.obj) : error LNK2001: unresolved external symbol _memmove
libcp.lib(ios.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z)
libcp.lib(iostream.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z)
libcp.lib(string.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z)
libcp.lib(nomemory.obj) : error LNK2001: unresolved external symbol "public: __thiscall exception::exception(class exception const &)" (??0exception@@QAE@ABV0@@Z)
libcp.lib(wlocale.obj) : error LNK2001: unresolved external symbol "public: __thiscall exception::exception(class exception const &)" (??0exception@@QAE@ABV0@@Z)
libcp.lib(xlocale.obj) : error LNK2001: unresolved external symbol "public: __thiscall exception::exception(class exception const &)" (??0exception@@QAE@ABV0@@Z)
libcp.lib(wlocale.obj) : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
libcp.lib(xlocale.obj) : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
libcp.lib(wiostrea.obj) : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
libcp.lib(locale0.obj) : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
libcp.lib(locale.obj) : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
libcp.lib(nomemory.obj) : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
libcp.lib(xlocale.obj) : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall exception::what(void)const " (?what@exception@@UBEPBDXZ)
libcp.lib(locale.obj) : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall exception::what(void)const " (?what@exception@@UBEPBDXZ)
libcp.lib(nomemory.obj) : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall exception::what(void)const " (?what@exception@@UBEPBDXZ)
libcp.lib(wlocale.obj) : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall exception::what(void)const " (?what@exception@@UBEPBDXZ)
libcp.lib(nomemory.obj) : error LNK2001: unresolved external symbol "public: __thiscall exception::exception(char const * const &)" (??0exception@@QAE@ABQBD@Z)
libcp.lib(wlocale.obj) : error LNK2001: unresolved external symbol "public: __thiscall exception::exception(char const * const &)" (??0exception@@QAE@ABQBD@Z)
libcp.lib(xlocale.obj) : error LNK2001: unresolved external symbol "public: __thiscall exception::exception(char const * const &)" (??0exception@@QAE@ABQBD@Z)
libcp.lib(ios.obj) : error LNK2001: unresolved external symbol "public: __thiscall exception::exception(char const * const &)" (??0exception@@QAE@ABQBD@Z)
libcp.lib(string.obj) : error LNK2001: unresolved external symbol "public: __thiscall exception::exception(char const * const 
在引用读卡器头文件时,会报错TransJoborderDlg.obj : error LNK2001: unresolved external symbol "int (__stdcall* TyA_CS_Write)(void *,unsigned char,unsigned char *)" (?TyA_CS_Write@@3P6GHPAXEPAE@ZA) TransJoborderDlg.obj : error LNK2001: unresolved external symbol "int (__stdcall* TyA_CS_Read)(void *,unsigned char,unsigned char *,unsigned char *)" (?TyA_CS_Read@@3P6GHPAXEPAE1@ZA) TransJoborderDlg.obj : error LNK2001: unresolved external symbol "int (__stdcall* TyA_CS_Authentication2)(void *,unsigned char,unsigned char,unsigned char *)" (?TyA_CS_Authentication2@@3P6GHPAXEEPAE@ZA) TransJoborderDlg.obj : error LNK2001: unresolved external symbol "int (__stdcall* TyA_Halt)(void *)" (?TyA_Halt@@3P6GHPAX@ZA) TransJoborderDlg.obj : error LNK2001: unresolved external symbol "int (__stdcall* TyA_Select)(void *,unsigned char *,unsigned char,unsigned char *)" (?TyA_Select@@3P6GHPAXPAEE1@ZA) TransJoborderDlg.obj : error LNK2001: unresolved external symbol "int (__stdcall* TyA_Anticollision)(void *,unsigned char,unsigned char *,unsigned char *)" (?TyA_Anticollision@@3P6GHPAXEPAE1@ZA) TransJoborderDlg.obj : error LNK2001: unresolved external symbol "int (__stdcall* TyA_Request)(void *,unsigned char,unsigned short *)" (?TyA_Request@@3P6GHPAXEPAG@ZA) TransJoborderDlg.obj : error LNK2001: unresolved external symbol "int (__stdcall* Sys_InitType)(void *,unsigned char)" (?Sys_InitType@@3P6GHPAXE@ZA) TransJoborderDlg.obj : error LNK2001: unresolved external symbol "int (__stdcall* Sys_SetAntenna)(void *,unsigned char)" (?Sys_SetAntenna@@3P6GHPAXE@ZA) TransJoborderDlg.obj : error LNK2001: unresolved external symbol "int (__stdcall* Sys_SetBuzzer)(void *,unsigned char)" (?Sys_SetBuzzer@@3P6GHPAXE@ZA) TransJoborderDlg.obj : error LNK2001: unresolved external symbol "int (__stdcall* Sys_SetLight)(void *,unsigned char)" (?Sys_SetLight@@3P6GHPAXE@ZA) TransJoborderDlg.obj : error LNK2001: unresolved external symbol "int (__stdcall* Sys_Close)(void * *)" (?Sys_Close@@3P6GHPAPAX@ZA) TransJoborderDlg.obj : error LNK2001: unresolved external symbol "int (__stdcall* Sys_IsOpen)(void *)" (?Sys_IsOpen@@3P6GHPAX@ZA) TransJoborderDlg.obj : error LNK2001: unresolved external symbol "int (__stdcall* Sys_Open)(void * *,unsigned long,unsigned short,unsigned short)" (?Sys_Open@@3P6GHPAPAXKGG@ZA) TransJoborderDlg.obj : error LNK2001: unresolved external symbol "int (__stdcall* Sys_GetHidSerialNumberStr)(unsigned long,unsigned short,unsigned short,char *,unsigned long)" (?Sys_GetHidSerialNumberStr@@3P6GHKGGPADK@ZA) TransJoborderDlg.obj : error LNK2001: unresolved external symbol "int (__stdcall* Sys_GetDeviceNum)(unsigned short,unsigned short,unsigned long *)" (?Sys_GetDeviceNum@@3P6GHGGPAK@ZA)这个如何解决
最新发布
07-03
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值