所以,我有一个代码非常简单的小项目。所有它真正做的是通过以下方式创建一个wxFrame:
wxFrame(NULL, -1, title, wxPoint(-1, -1), wxSize(380, 220))
我的任何代码都没有编译问题。当我这样做时出现问题:
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" (?g_isPainting@@3HA) 1>CApp.obj : error LNK2020: unresolved token (0A000DBE) "int g_isPainting" (?g_isPainting@@3HA) 1>CLoadingFrame.obj : error LNK2028: unresolved token (0A000DB4) "void __cdecl wxOnAssert(char const *,int,char const *,char const *,char const *)" (?wxOnAssert@@$$FYAXPBDH000@Z) referenced in function "protected: void __thiscall wxShadowObjectFields_wxImplementation_HashTable::ResizeTable(unsigned int)" (?ResizeTable@wxShadowObjectFields_wxImplementation_HashTable@@$$FIAEXI@Z) 1>CApp.obj : error LNK2028: unresolved token (0A000DC0) "void __cdecl wxOnAssert(char const *,int,char const *,char const *,char const *)" (?wxOnAssert@@$$FYAXPBDH000@Z) referenced in function "protected: void const * __thiscall wxVectorBase::GetItem(unsigned int)const " (?GetItem@wxVectorBase@@$$FIBEPBXI@Z) 1>CApp.obj : error LNK2019: unresolved external symbol "void __cdecl wxOnAssert(char const *,int,char const *,char const *,char const *)" (?wxOnAssert@@$$FYAXPBDH000@Z) referenced in function "protected: void const * __thiscall wxVectorBase::GetItem(unsigned int)const " (?GetItem@wxVectorBase@@$$FIBEPBXI@Z) 1>CLoadingFrame.obj : error LNK2001: unresolved external symbol "void __cdecl wxOnAssert(char const *,int,char const *,char const *,char const *)" (?wxOnAssert@@$$FYAXPBDH000@Z) 1>CApp.obj : error LNK2001: unresolved external symbol "int g_isPainting" (?g_isPainting@@3HA) 1>CLoadingFrame.obj : error LNK2001: unresolved external symbol "int g_isPainting" (?g_isPainting@@3HA) 1>CApp.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall wxAppConsole::OnAssertFailure(char const *,int,char const *,char const *,char const *)" (?OnAssertFailure@wxAppConsole@@UAEXPBDH000@Z) 1>CApp.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall wxAppConsole::OnAssert(char const *,int,char const *,char const *)" (?OnAssert@wxAppConsole@@UAEXPBDH00@Z) 1>D:\WickedLauncher\WickedLauncherv2\Debug\WickedLauncherv2.exe : fatal error LNK1120: 8 unresolved externals
我将不胜感激任何帮助!
问候。
答案 0 :(得分:0)
在哪里定义了g_isPainting?
您是否为wxAppConsole的链接器添加了正确的库?