# re: Galaxy2D游戲引擎教程2 - 使用Framework 回復 更多評論
2010-01-13 21:05 by
我按你的方法配置好工程,并把你寫的游戲框架代碼拷貝到工程下,編譯后就報下面這個錯誤,是ggefw.lib文件有問題嗎?還是我哪里沒有設置好。
------ 已啟動生成: 項目: test22, 配置: Debug Win32 ------
正在鏈接...
LINK : warning LNK4098: 默認庫“LIBCMT”與其他庫的使用沖突;請使用 /NODEFAULTLIB:library
ggefw.lib(ggefwbase.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::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::erase(unsigned int,unsigned int)" (?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z) 中被引用
ggefw.lib(ggefwbase.obj) : error LNK2019: 無法解析的外部符號 "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ),該符號在函數 "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) 中被引用
D:\My Documents\Visual Studio 2005\Projects\test11\Debug\test22.exe : fatal error LNK1120: 2 個無法解析的外部命令
生成日志保存在“file://d:\My Documents\Visual Studio 2005\Projects\test11\test22\Debug\BuildLog.htm”
test22 - 3 個錯誤,1 個警告
========== 生成: 0 已成功, 1 已失敗, 0 最新, 0 已跳過 ==========
# re: Galaxy2D游戲引擎教程2 - 使用Framework 回復 更多評論
2010-01-14 18:16 by
不好意思,
是ggefw.lib的問題,
前不久新加的功能疏忽了字符串兼容問題,
導致vs2003與vs2005默認庫沖突,
盡量在這兩天內修復。