我正在将我的项目从vc6转换为VS 2010.当我编译我的项目时,出现如下错误,可能是.lib输入。我在Linker-> Input-> Additional Dependencies中添加了所有这些库,还在Link-> General-> Additional Library目录中提供了这些.lib文件的路径。对此的任何提示将非常有帮助。错误LNK2001:无法解析的外部符号
lb0.lib(ob0.obj) :error LNK2001: unresolved external symbol "void __stdcall SetLastExP(class ExceptionClass *)" ([email protected]@[email protected]@@Z)
lb1.lib(ob1.obj) : error LNK2001: unresolved external symbol "void __stdcall SetLastExP(class ExceptionClass *)" ([email protected]@[email protected]@@Z)
lb2.lib(ob2.obj) : error LNK2001: unresolved external symbol "void __stdcall SetLastExP(class ExceptionClass *)" ([email protected]@[email protected]@@Z)
lb3.lib(ob3.obj) : error LNK2001: unresolved external symbol "void __stdcall SetLastExP(class ExceptionClass *)" ([email protected]@[email protected]@@Z)
lb3.lib(ob4.obj) : error LNK2001: unresolved external symbol "void __stdcall SetLastExP(class ExceptionClass *)" ([email protected]@[email protected]@@Z)
lb3.lib(ob5.obj) : error LNK2001: unresolved external symbol "void __stdcall SetLastExP(class ExceptionClass *)" ([email protected]@[email protected]@@Z)
lb4.lib(0b6.obj) : error LNK2001: unresolved external symbol "void __stdcall SetLastExP(class ExceptionClass *)" ([email protected]@[email protected]@@Z)
感谢
我可能是错的,但我认为微软更改了默认TCHAR定义从VC++ 6开始,把char形成为wchar。可能是你的前面的lib在方法签名中导出了char *,但是你的新代码正在寻找wchar。如果是这种情况,那么您可以重新编译库,或更改新项目中的默认字符集。 – Jimmy 2011-02-16 13:00:40
嗨吉米,我的lib和我的项目都只使用wchar。 – Arvind 2011-02-16 13:08:33