C++ 使用Visual Studio 2005(VC8)时发生链接错误
我在尝试链接可执行文件的发布版本时遇到了一系列链接错误(调试版本没有相同的问题)。比较链接的命令行不会发现任何问题。 大致有两种类型的错误,这两种错误我都无法处理 第一类抱怨未解析的外部符号_declspec(dllimport) 例如: 错误LNK2019:未解析的外部符号 “_declspec(dllimport) 公众:u_uthis call stlpd_std::basic_string,class stlpd_std::allocator>::basic_string,class stlpd_std::allocator>(class stlpd_std::basic_string,class stlpd_std::allocator>const&)“(\u imp??0?$basic_string@DV?$char_traits@D@stlpd_std@@V$allocator@D@2@@stlpd\u标准@@QAE@ABV01@@Z) 在函数中引用“public:uu thiscall Springfield::generic::runtime\u error::runtime\u error(类stlpd\u std::basic\u string,类stlpd\u std::allocator>const&)”(??0运行时_error@generic@斯普林菲尔德@@QAE@ABV?$basic_string@DV?$char_traits@D@stlpd_std@@V$allocator@D@2@@@stlpd_std@@@Z) 对于更易于阅读的版本(替换所有字符串): 错误LNK2019:未解析的外部符号 “uu declspec(dllimport) 公众:u_uthis call string::basic\u string,类stlpd\u std::allocator>(类string const&)“(\u imp??0?$basic_string@DV?$char_traits@D@stlpd_std@@V$allocator@D@2@@stlpd\u标准@@QAE@ABV01@@Z) 在函数“public:u thiscall Springfield::generic::runtime_error::runtime_error(类字符串const&)”中引用(??0运行时)_error@generic@斯普林菲尔德@@QAE@ABV?$basic_string@DV?$char_traits@D@stlpd_std@@V$allocator@D@2@@@stlpd_std@@@Z 第二类错误抱怨 未解析的外部符号\uuu CrtDbgReportWC++ 使用Visual Studio 2005(VC8)时发生链接错误,c++,visual-studio,linker,vc8,C++,Visual Studio,Linker,Vc8,我在尝试链接可执行文件的发布版本时遇到了一系列链接错误(调试版本没有相同的问题)。比较链接的命令行不会发现任何问题。 大致有两种类型的错误,这两种错误我都无法处理 第一类抱怨未解析的外部符号_declspec(dllimport) 例如: 错误LNK2019:未解析的外部符号 “_declspec(dllimport) 公众:u_uthis call stlpd_std::basic_string,class stlpd_std::allocator>::basic_string,class s
我希望在处理此问题时能获得一些见解。从错误中可以看出,您似乎没有将CRT作为链接库之一。这里是指向Visual Studio 2005中提供的不同CRT库的链接。请选择最合适的CRT库,并确保它位于要链接的库列表中