Reputation: 11
I have just solved a wxWidget error of lwxmwsu31u.a is not found in codeBlocks and when trying to build and run my first c++ wxwidget example i get this warning "warning: 'virtual void wxWindowBase::SetInitialBaseSize(const wxSize&)' is deprecated", there are about 245 warnings and i don't know how to solve them. Please help.
Upvotes: 0
Views: 408
Reputation: 7198
This is a known issue for MinGW GCC compiler version < 5.3 (related to "assert" implementation).
A workaround is editing yourWxDir/include/wx/window.h
:
Go down about 1740 lines, until you see
wxDEPRECATED_MSG("use SetInitialSize() instead.")
void SetBestSize(const wxSize& size);
wxDEPRECATED_MSG("use SetInitialSize() instead.")
virtual void SetInitialBestSize(const wxSize& size);
Replace last two lines (the second wxDEPRECATED_MSG) with
#if !wxCHECK_GCC_VERSION(5, 0)
wxDEPRECATED_MSG("use SetInitialSize() instead.")
#endif
virtual void SetInitialBestSize(const wxSize& size);
If you have built wxWidgets on your own (instead of a prebuilt download) then please rebuild it again.
If you use precompiled headers then delete .pch
files and rebuild your app.
Upvotes: 0
Reputation: 51
The compiler is telling you that the method you are trying to call is no longer used by the library. Therefore the compiler cannot link with it. The wxWindow class reference does not mention your function call either. Instead, try using
wxWindow::SetInitialSize (const wxSize &size=wxDefaultSize)
It is very likely that 1 of your 245 warning is telling you to use SetInitialSize instead.
Upvotes: 1