2011-01-26 81 views
0

所以,我有一個非常簡單的代碼的小項目。它真正做的是用下面的方式創建一個wxFrame:wxWidgets defaultlib'MSVCRT'衝突問題

wxFrame(NULL, -1, title, wxPoint(-1, -1), wxSize(380, 220)) 

沒有任何編譯問題,我的任何代碼。問題occures當我做這一行:

IMPLEMENT_APP(App); 

應用程序是:

class App: public wxApp 

所以,當我做到這一點,我打編譯,我有以下錯誤:

 
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library 
1>CApp.obj : warning LNK4248: unresolved typeref token (01000019) for 'wxVideoMode'; image may not run 
1>CLoadingFrame.obj : warning LNK4248: unresolved typeref token (01000019) for 'wxToolTip'; image may not run 
1>CLoadingFrame.obj : warning LNK4248: unresolved typeref token (0100001A) for 'wxDropTarget'; image may not run 
1>CLoadingFrame.obj : error LNK2020: unresolved token (0A000DB2) "int g_isPainting" ([email protected]@3HA) 
1>CApp.obj : error LNK2020: unresolved token (0A000DBE) "int g_isPainting" ([email protected]@3HA) 
1>CLoadingFrame.obj : error LNK2028: unresolved token (0A000DB4) "void __cdecl wxOnAssert(char const *,int,char const *,char const *,char const *)" ([email protected]@[email protected]) referenced in function "protected: void __thiscall wxShadowObjectFields_wxImplementation_HashTable::ResizeTable(unsigned int)" ([email protected][email protected]@[email protected]) 
1>CApp.obj : error LNK2028: unresolved token (0A000DC0) "void __cdecl wxOnAssert(char const *,int,char const *,char const *,char const *)" ([email protected]@[email protected]) referenced in function "protected: void const * __thiscall wxVectorBase::GetItem(unsigned int)const " ([email protected]@@[email protected]) 
1>CApp.obj : error LNK2019: unresolved external symbol "void __cdecl wxOnAssert(char const *,int,char const *,char const *,char const *)" ([email protected]@[email protected]) referenced in function "protected: void const * __thiscall wxVectorBase::GetItem(unsigned int)const " ([email protected]@@[email protected]) 
1>CLoadingFrame.obj : error LNK2001: unresolved external symbol "void __cdecl wxOnAssert(char const *,int,char const *,char const *,char const *)" ([email protected]@[email protected]) 
1>CApp.obj : error LNK2001: unresolved external symbol "int g_isPainting" ([email protected]@3HA) 
1>CLoadingFrame.obj : error LNK2001: unresolved external symbol "int g_isPainting" ([email protected]@3HA) 
1>CApp.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall wxAppConsole::OnAssertFailure(char const *,int,char const *,char const *,char const *)" ([email protected]@@[email protected]) 
1>CApp.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall wxAppConsole::OnAssert(char const *,int,char const *,char const *)" ([email protected]@@[email protected]) 
1>D:\WickedLauncher\WickedLauncherv2\Debug\WickedLauncherv2.exe : fatal error LNK1120: 8 unresolved externals 

我將不勝感激任何幫助!

問候。

+0

看起來你正在使用C++和Visual Studio。那是對的嗎?你正在做一個調試或發佈版本?你檢查過所有的wxWidgets庫是否匹配(調試或發佈)?你是說如果你評論出IMPLEMENT_APP(App);你的應用程序鏈接成功 – ravenspoint 2011-02-01 16:32:29

回答

0

其中定義了g_isPainting?

您是否向wxAppConsole的鏈接器添加了正確的庫?

+0

我沒有定義g_isPainting,所以它必須在wxWidgets中。 「你把什麼是正確的庫添加到鏈接器」。我按照文檔所述配置了所有內容。我已經編譯了可以正常工作的東西。 – OneShotKillah 2011-01-26 13:33:31