今天我在从2008年到2010年更新VS版本时遇到了链接问题,错误是这样的:
error LNK2019: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::assign(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned int,unsigned int)" (?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z)
error LNK2019: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) referenced in function "protected: bool __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Grow(unsigned int,bool)" (?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAE_NI_N@Z)
Run Code Online (Sandbox Code Playgroud)
我在网上搜索了这个问题,并在这个地址找到了类似的帖子:http://social.msdn.microsoft.com/Forums/en/vcgeneral/thread/5ac28a31-3339-4db1-90f4-68edad360309
但这些答案都不能解决我的问题.谁能给我一些如何解决这个问题的技巧?
非常感谢您的帮助!