64,651
社区成员
发帖
与我相关
我的任务
分享
1>ProgramCommonLibForEngine_d.lib(Profiler.obj) : error LNK2001: 无法解析的外部符号 "long const std::_BADOFF" (?_BADOFF@std@@3JB)
1>ProgramCommonLibForEngine_d.lib(WzMemoryTracker.obj) : error LNK2001: 无法解析的外部符号 "long const std::_BADOFF" (?_BADOFF@std@@3JB)
1>ProgramCommonLibForEngine_d.lib(Clock.obj) : error LNK2001: 无法解析的外部符号 "long const std::_BADOFF" (?_BADOFF@std@@3JB)
1>ProgramCommonLibForEngine_d.lib(Profiler.obj) : error LNK2019: 无法解析的外部符号 "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ),该符号在函数 "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> >::append(char const *,unsigned int)" (?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z) 中被引用
1>ProgramCommonLibForEngine_d.lib(WzMemoryTracker.obj) : error LNK2001: 无法解析的外部符号 "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
1>ProgramCommonLibForEngine_d.lib(Clock.obj) : error LNK2001: 无法解析的外部符号 "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
1>ProgramCommonLibForEngine_d.lib(Profiler.obj) : error LNK2019: 无法解析的外部符号 "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ),该符号在函数 "public: class std::basic_string<char,struct std::char_traits<char>,class std::_DebugHeapAllocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::_DebugHeapAllocator<char> >::erase(unsigned int,unsigned int)" (?erase@?$basic_string@DU?$char_traits@D@std@@V?$_DebugHeapAllocator@D@2@@std@@QAEAAV12@II@Z) 中被引用
1>ProgramCommonLibForEngine_d.lib(WzMemoryTracker.obj) : error LNK2001: 无法解析的外部符号 "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
1>ProgramCommonLibForEngine_d.lib(Clock.obj) : error LNK2001: 无法解析的外部符号 "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
1>ProgramCommonLibForEngine_d.lib(Profiler.obj) : error LNK2001: 无法解析的外部符号 "struct std::_DebugHeapTag_t const std::_DebugHeapTag" (?_DebugHeapTag@std@@3U_DebugHeapTag_t@1@B)
1>ProgramCommonLibForEngine_d.lib(WzMemoryTracker.obj) : error LNK2001: 无法解析的外部符号 "struct std::_DebugHeapTag_t const std::_DebugHeapTag" (?_DebugHeapTag@std@@3U_DebugHeapTag_t@1@B)
1>ProgramCommonLibForEngine_d.lib(Clock.obj) : error LNK2001: 无法解析的外部符号 "struct std::_DebugHeapTag_t const std::_DebugHeapTag" (?_DebugHeapTag@std@@3U_DebugHeapTag_t@1@B)
1>ProgramCommonLibForEngine_d.lib(Profiler.obj) : error LNK2001: 无法解析的外部符号 "__int64 std::_Fpz" (?_Fpz@std@@3_JA)
1>ProgramCommonLibForEngine_d.lib(WzMemoryTracker.obj) : error LNK2001: 无法解析的外部符号 "__int64 std::_Fpz" (?_Fpz@std@@3_JA)
1>ProgramCommonLibForEngine_d.lib(Clock.obj) : error LNK2001: 无法解析的外部符号 "__int64 std::_Fpz" (?_Fpz@std@@3_JA)
1>ProgramCommonLibForEngine_d.lib(Profiler.obj) : error LNK2019: 无法解析的外部符号 "public: void __thiscall std::ios_base::_Addstd(void)" (?_Addstd@ios_base@std@@QAEXXZ),该符号在函数 "protected: void __thiscall std::basic_ios<char,struct std::char_traits<char> >::init(class std::basic_streambuf<char,struct std::char_traits<char> > *,bool)" (?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IAEXPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z) 中被引用
1>ProgramCommonLibForEngine_d.lib(WzMemoryTracker.obj) : error LNK2001: 无法解析的外部符号 "public: void __thiscall std::ios_base::_Addstd(void)" (?_Addstd@ios_base@std@@QAEXXZ)
一般出现lnk2019错误都是库文件没添加造成的。
项目--》属性--》配置属性--》链接器-》输入--》附加依赖项
在其中加入所需库文件,同时在“链接器--》常规--》附加库目录”中填入相应库名。
这样应该就可以
#include <iosteram>
#include <string>
要只包含
<iosfwd>