问题描述
在VS2017中使用VS2005编译的lib文件,报链接错误:
error LNK2001: 无法解析的外部符号 "__declspec(dllimport) public: unsigned int __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::find(char,unsigned int)const " (__imp_?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z)
分析
在网上找了各种方法,始终未能解决。有知道的网友请一定不吝告知啊!
解决方案
无奈之下,只能使用VS2005重新创建工程,并引用VS2005编译的静态库。
无奈啊!
另
VS版本的不兼容,真是让人脑阔疼!