wxWidgets 2.9 mono lib under VC10 causes errors

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
Schala
In need of some credit
In need of some credit
Posts: 9
Joined: Mon Jul 16, 2012 8:11 am

wxWidgets 2.9 mono lib under VC10 causes errors

Post by Schala » Mon Jul 16, 2012 8:23 am

I just compiled wxWidgets 2.9.4 as a monolithic release DLL and attempted to compile the "hello world" tutorial as a test, using CMake to save me the trouble of tediously adding in all the dependencies. However, despite CMake giving me a successful generation of a VC2010 project setup, I got a slew of unresolved external symbol errors. They are as follows:

Code: Select all

Error	1	error LNK2019: unresolved external symbol "void (__cdecl* wxTheAssertHandler)(class wxString const &,int,class wxString const &,class wxString const &,class wxString const &)" ([email protected]@[email protected]@[email protected]) referenced in function "void (__cdecl*__cdecl wxSetAssertHandler(void (__cdecl*)(class wxString const &,int,class wxString const &,class wxString const &,class wxString const &)))(class wxString const &,int,class wxString const &,class wxString const &,class wxString const &)" ([email protected]@[email protected]@[email protected]@[email protected])	C:\Users\admin\Downloads\h\h.obj
Error	2	error LNK2019: unresolved external symbol "class wxMBConv * wxConvLibcPtr" ([email protected]@[email protected]@A) referenced in function "class wxMBConv & __cdecl wxGet_wxConvLibc(void)" ([email protected]@[email protected]@XZ)	C:\Users\admin\Downloads\h\h.obj
Error	3	error LNK2019: unresolved external symbol "private: static unsigned long wxLog::ms_logLevel" ([email protected]@@0KA) referenced in function "public: static void __cdecl wxLog::SetLogLevel(unsigned long)" ([email protected]@@[email protected])	C:\Users\admin\Downloads\h\h.obj
Error	4	error LNK2019: unresolved external symbol "protected: static class wxAppConsole * (__cdecl* wxAppConsoleBase::ms_appInitFn)(void)" ([email protected]@@[email protected]@XZA) referenced in function "public: static void __cdecl wxAppConsoleBase::SetInitializerFunction(class wxAppConsole * (__cdecl*)(void))" ([email protected]@@[email protected]@[email protected])	C:\Users\admin\Downloads\h\h.obj
Error	5	error LNK2019: unresolved external symbol "protected: static class wxAppConsole * wxAppConsoleBase::ms_appInstance" ([email protected]@@[email protected]@A) referenced in function "public: static class wxAppConsole * __cdecl wxAppConsoleBase::GetInstance(void)" ([email protected]@@[email protected]@XZ)	C:\Users\admin\Downloads\h\h.obj
Error	6	error LNK2019: unresolved external symbol "class wxSize const wxDefaultSize" ([email protected]@[email protected]@B) referenced in function "protected: virtual class wxSize __thiscall wxWindowBase::DoGetBestClientSize(void)const " ([email protected]@@[email protected]@XZ)	C:\Users\admin\Downloads\h\h.obj
Error	7	error LNK2019: unresolved external symbol "class wxPoint const wxDefaultPosition" ([email protected]@[email protected]@B) referenced in function "protected: virtual void __thiscall wxWindow::MSWEndDeferWindowPos(void)" ([email protected]@@MAEXXZ)	C:\Users\admin\Downloads\h\h.obj
Error	8	error LNK2019: unresolved external symbol "public: static unsigned int const wxString::npos" ([email protected]@@2IB) referenced in function "private: static class wxScopedCharTypeBuffer<wchar_t> __cdecl wxString::ImplStr(char const *,class wxMBConv const &)" ([email protected]@@[email protected][email protected]@[email protected]@@Z)	C:\Users\admin\Downloads\h\h.obj
Error	9	error LNK2019: unresolved external symbol "wchar_t const * const wxEmptyString" ([email protected]@3PB_WB) referenced in function "public: class wxMenuItem * __thiscall wxMenuBase::AppendSeparator(void)" ([email protected]@@[email protected]@XZ)	C:\Users\admin\Downloads\h\h.obj
Error	10	error LNK2019: unresolved external symbol "char const * const wxStatusLineNameStr" ([email protected]@3QBDB) referenced in function "public: __thiscall MyFrame::MyFrame(class wxString const &,class wxPoint const &,class wxSize const &)" ([email protected]@[email protected]@@[email protected]@[email protected]@@Z)	C:\Users\admin\Downloads\h\h.obj
Error	11	error LNK2019: unresolved external symbol "char const * const wxFrameNameStr" ([email protected]@3QBDB) referenced in function "public: __thiscall MyFrame::MyFrame(class wxString const &,class wxPoint const &,class wxSize const &)" ([email protected]@[email protected]@@[email protected]@[email protected]@@Z)	C:\Users\admin\Downloads\h\h.obj
Error	12	error LNK2019: unresolved external symbol "class wxEventTypeTag<class wxCommandEvent> const wxEVT_COMMAND_MENU_SELECTED" ([email protected]@[email protected]@@@@B) referenced in function "private: virtual bool __thiscall MyApp::OnInit(void)" ([email protected]@@EAE_NXZ)	C:\Users\admin\Downloads\h\h.obj
Error	13	error LNK1120: 12 unresolved externals	C:\Users\admin\Downloads\h\Release\hworld.exe
And my CMakeLists.txt file is as follows:

Code: Select all

cmake_minimum_required(VERSION 2.6)
project(hworld)
add_executable(hworld WIN32 h.cpp)
FIND_PACKAGE(wxWidgets REQUIRED mono)
IF(wxWidgets_FOUND)
  INCLUDE(${wxWidgets_USE_FILE})
  TARGET_LINK_LIBRARIES(hworld ${wxWidgets_LIBRARIES})
ENDIF(wxWidgets_FOUND)
I'd appreciate any help that's willing to be given. Thanks!

Post Reply