網狐子游戲編譯常見問題
阿新 • • 發佈:2019-02-13
1.編譯遊戲提示:ShowHandBattleAndroid.exp : warning LNK4070: .EXP 中的 /OUT: AndroidServiceD.dll 指令與輸出檔名“../../../../執行/Debug/Ansi/ShowHandBattleAndroid.dll”不同。
解決方法:解決方案--屬性--配置,將Debug 改為Rlease_unicode,然後重新編譯即可。
2.編譯提示缺少d3dx9.h檔案。
解決方法:一般是客戶端才會用到這個檔案,專案--屬性--c++--常規 附加包含目錄,這裡輸入dxsdk的inclue路徑即可,比如:C:\sdk2005\Include
3.
AttemperEngineSink.obj : error LNK2019: 無法解析的外部符號 "__declspec(dllimport) public: static bool __cdecl CTraceService::TraceString(char const *,enum enTraceLevel)"
無法解析外部符號:
CTraceService::TraceString 解決方法: 這是因為缺少相應的lib檔案,開啟stdafx.h 加入以下程式碼:
//編譯環境 #include "..\..\..\SDKCondition.h" ////////////////////////////////////////////////////////////////////////////////// #ifdef SDK_CONDITION ////////////////////////////////////////////////////////////////////////////////// //開發環境 #include "..\..\..\開發庫\Include\GameFrameHead.h" #ifndef _DEBUG #ifndef _UNICODE #pragma comment (lib,"../../../開發庫/Lib/Ansi/WHImage.lib") #pragma comment (lib,"../../../開發庫/Lib/Ansi/GameFrame.lib") #pragma comment (lib,"../../../開發庫/Lib/Ansi/GameEngine.lib") #pragma comment (lib,"../../../開發庫/Lib/Ansi/SkinControl.lib") #pragma comment (lib,"../../../開發庫/Lib/Ansi/ServiceCore.lib") #else #pragma comment (lib,"../../../開發庫/Lib/Unicode/WHImage.lib") #pragma comment (lib,"../../../開發庫/Lib/Unicode/GameFrame.lib") #pragma comment (lib,"../../../開發庫/Lib/Unicode/GameEngine.lib") #pragma comment (lib,"../../../開發庫/Lib/Unicode/SkinControl.lib") #pragma comment (lib,"../../../開發庫/Lib/Unicode/ServiceCore.lib") #endif #else #ifndef _UNICODE #pragma comment (lib,"../../../開發庫/Lib/Ansi/WHImageD.lib") #pragma comment (lib,"../../../開發庫/Lib/Ansi/GameFrameD.lib") #pragma comment (lib,"../../../開發庫/Lib/Ansi/GameEngineD.lib") #pragma comment (lib,"../../../開發庫/Lib/Ansi/SkinControlD.lib") #pragma comment (lib,"../../../開發庫/Lib/Ansi/ServiceCoreD.lib") #else #pragma comment (lib,"../../../開發庫/Lib/Unicode/WHImageD.lib") #pragma comment (lib,"../../../開發庫/Lib/Unicode/GameFrameD.lib") #pragma comment (lib,"../../../開發庫/Lib/Unicode/GameEngineD.lib") #pragma comment (lib,"../../../開發庫/Lib/Unicode/SkinControlD.lib") #pragma comment (lib,"../../../開發庫/Lib/Unicode/ServiceCoreD.lib") #endif #endif ////////////////////////////////////////////////////////////////////////////////// #else ////////////////////////////////////////////////////////////////////////////////// //系統環境 #include "..\..\..\系統模組\客戶端元件\遊戲框架\GameFrameHead.h" #ifndef _DEBUG #ifndef _UNICODE #pragma comment (lib,"../../../../系統模組/連結庫/Ansi/WHImage.lib") #pragma comment (lib,"../../../../系統模組/連結庫/Ansi/GameFrame.lib") #pragma comment (lib,"../../../../系統模組/連結庫/Ansi/GameEngine.lib") #pragma comment (lib,"../../../../系統模組/連結庫/Ansi/SkinControl.lib") #pragma comment (lib,"../../../../系統模組/連結庫/Ansi/ServiceCore.lib") #else #pragma comment (lib,"../../../系統模組/連結庫/Unicode/WHImage.lib") #pragma comment (lib,"../../../系統模組/連結庫/Unicode/GameFrame.lib") #pragma comment (lib,"../../../系統模組/連結庫/Unicode/GameEngine.lib") #pragma comment (lib,"../../../系統模組/連結庫/Unicode/SkinControl.lib") #pragma comment (lib,"../../../系統模組/連結庫/Unicode/ServiceCore.lib") #endif #else #ifndef _UNICODE #pragma comment (lib,"../../../系統模組/連結庫/Ansi/WHImageD.lib") #pragma comment (lib,"../../../系統模組/連結庫/Ansi/GameFrameD.lib") #pragma comment (lib,"../../../系統模組/連結庫/Ansi/GameEngineD.lib") #pragma comment (lib,"../../../系統模組/連結庫/Ansi/SkinControlD.lib") #pragma comment (lib,"../../../系統模組/連結庫/Ansi/ServiceCoreD.lib") #else #pragma comment (lib,"../../../系統模組/連結庫/Unicode/WHImageD.lib") #pragma comment (lib,"../../../系統模組/連結庫/Unicode/GameFrameD.lib") #pragma comment (lib,"../../../系統模組/連結庫/Unicode/GameEngineD.lib") #pragma comment (lib,"../../../系統模組/連結庫/Unicode/SkinControlD.lib") #pragma comment (lib,"../../../系統模組/連結庫/Unicode/ServiceCoreD.lib") #endif #endif #endif #define __TEST__ 1 #define __BANKER___ #define __SPECIAL___