User interface wxWidgets defaultlib';MSVCRT';冲突问题
所以,我有一个小项目,有一个非常简单的代码。它真正做的就是通过以下方式创建wxFrame:User interface wxWidgets defaultlib';MSVCRT';冲突问题,user-interface,frameworks,wxwidgets,User Interface,Frameworks,Wxwidgets,所以,我有一个小项目,有一个非常简单的代码。它真正做的就是通过以下方式创建wxFrame: wxFrame(NULL, -1, title, wxPoint(-1, -1), wxSize(380, 220)) 我的任何代码都没有编译问题。执行此行时出现问题: IMPLEMENT_APP(App); 应用程序是: class App: public wxApp 因此,当我这样做并点击compile时,我有以下错误: 1>LINK : warning LNK4098: defaultlib
wxFrame(NULL, -1, title, wxPoint(-1, -1), wxSize(380, 220))
我的任何代码都没有编译问题。执行此行时出现问题:
IMPLEMENT_APP(App);
应用程序是:
class App: public wxApp
因此,当我这样做并点击compile时,我有以下错误:
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
1> 链接:警告LNK4098:defaultlib'MSVCRT'与其他lib的使用冲突;使用/NODEFAULTLIB:library
1> CApp.obj:警告LNK4248:未解析的typeref标记(01000019)用于“WxvideMode”;映像可能无法运行
1> CLoadingFrame.obj:警告LNK4248:未解析“wxToolTip”的typeref标记(01000019);映像可能无法运行
1> CLoadingFrame.obj:警告LNK4248:未解析“wxDropTarget”的typeref标记(0100001A);映像可能无法运行
1> CLoadingFrame.obj:错误LNK2020:未解析的令牌(0A000DB2)“int g_ispaint”(?g_ispaint@@3HA)
1> CApp.obj:错误LNK2020:未解析的令牌(0A000DBE)“int g_Ispaint”(?g_Ispaint@@3HA)
1> CLoadingFrame.obj:错误LNK2028:未解析的令牌(0A000DB4)“void u cdecl wxOnAssert(char const*,int,char const*,char const*,char const*)”(?wxOnAssert@@$$FYAXPBDH000@Z)函数“protected:void”中引用了此调用wxShadowObjectFields\u wxImplementation\u HashTable::ResizeTable(unsigned int)”(?ResizeTable@wxShadowObjectFields_wxImplementation_HashTable@@$$FIAEXI@Z)
1> CApp.obj:错误LNK2028:未解析的令牌(0A000DC0)“void u cdecl wxOnAssert(char const*,int,char const*,char const*,char const*)”(?wxOnAssert@@$$FYAXPBDH000@Z)函数“protected:void const*u_thiscall wxVectorBase::GetItem(unsigned int)const”中引用(?GetItem@wxVectorBase@@$$FIBEPBXI@Z)
1> CApp.obj:错误LNK2019:未解析的外部符号“void uu cdecl wxOnAssert(字符常量*,int,字符常量*,字符常量*)”(?wxOnAssert@@$$FYAXPBDH000@Z)函数“protected:void const*u_thiscall wxVectorBase::GetItem(unsigned int)const”中引用(?GetItem@wxVectorBase@@$$FIBEPBXI@Z)
1> CLoadingFrame.obj:错误LNK2001:未解析的外部符号“void uu cdecl wxOnAssert(char const*,int,char const*,char const*,char const*)”(?wxOnAssert@@$$FYAXPBDH000@Z)
1> CApp.obj:错误LNK2001:未解析的外部符号“int g_ispaint”(?g_ispaint@@3HA)
1> CLoadingFrame.obj:错误LNK2001:未解析的外部符号“int g_ispaint”(?g_ispaint@@3HA)
1> CApp.obj:错误LNK2001:未解析的外部符号“public:virtual void u thiscall wxAppConsole::OnAssertFailure(char const*,int,char const*,char const*,char const*)”(?OnAssertFailure@wxAppConsole@@UAEXPBDH000@Z)
1> CApp.obj:错误LNK2001:未解析的外部符号“public:virtual void u thiscall wxAppConsole::OnAssert(char const*,int,char const*,char const*)”(?OnAssert@wxAppConsole@@UAEXPBDH00@Z)
1> D:\WickedLauncher\WickedLauncherv2\Debug\WickedLauncherv2.exe:致命错误LNK1120:8个未解析的外部
我将感谢任何帮助
关于。哪里定义了g_喷漆
您是否为wxAppConsole的链接器添加了正确的库?我没有定义g_Ispaint,因此它必须在wxWidgets中。您所说的“将正确的库添加到链接器”到底是什么意思我按照文档中所说的配置了所有东西。我已经编译了一些工作得很好的东西。看起来你正在使用C++和VisualStudio。这是正确的吗?你在做调试还是发布构建?你检查过所有的WxWIDGET库匹配(是调试还是发布)??你的意思是,如果你注释掉应用程序(APP),你的应用程序链接成功?