Search code examples
compilationwxwidgets

Wxwidgets - lot of warnings with standard code


i'm using Linux Mint. I've tried to install wxwidgets from repos, and done it, but when compiling standard code (from wxwidgets project template) got this warnings (and more):

||=== aaaa, Debug ===|
/usr/include/wx-2.8/wx/buffer.h||In member function ‘void wxMemoryBuffer::AppendByte(char)’:|
/usr/include/wx-2.8/wx/debug.h|194|warning: typedef ‘wxDummyCheckInt’ locally defined but not used [-Wunused-local-typedefs]|
/usr/include/wx-2.8/wx/debug.h|224|note: in expansion of macro ‘wxFORCE_SEMICOLON’|
/usr/include/wx-2.8/wx/debug.h|233|note: in expansion of macro ‘wxCHECK2_MSG’|
/usr/include/wx-2.8/wx/buffer.h|289|note: in expansion of macro ‘wxCHECK_RET’|
/usr/include/wx-2.8/wx/vector.h||In member function ‘wxVectorBase& wxVectorBase::operator=(const wxVectorBase&)’:|
/usr/include/wx-2.8/wx/debug.h|194|warning: typedef ‘wxDummyCheckInt’ locally defined but not used [-Wunused-local-typedefs]|
/usr/include/wx-2.8/wx/debug.h|224|note: in expansion of macro ‘wxFORCE_SEMICOLON’|
/usr/include/wx-2.8/wx/debug.h|186|note: in expansion of macro ‘wxCHECK2_MSG’|
/usr/include/wx-2.8/wx/debug.h|183|note: in expansion of macro ‘wxCHECK_MSG’|
/usr/include/wx-2.8/wx/vector.h|129|note: in expansion of macro ‘wxCHECK’|
/usr/include/wx-2.8/wx/debug.h|194|warning: typedef ‘wxDummyCheckInt’ locally defined but not used [-Wunused-local-typedefs]|
/usr/include/wx-2.8/wx/debug.h|224|note: in expansion of macro ‘wxFORCE_SEMICOLON’|
/usr/include/wx-2.8/wx/debug.h|189|note: in expansion of macro ‘wxCHECK2_MSG’|
/usr/include/wx-2.8/wx/vector.h|148|note: in expansion of macro ‘wxCHECK2’|
/usr/include/wx-2.8/wx/vector.h|158|note: in expansion of macro ‘WX_DECLARE_VECTORBASE’|
/usr/include/wx-2.8/wx/clntdata.h|172|note: in expansion of macro ‘_WX_DECLARE_VECTOR’|
/usr/include/wx-2.8/wx/clntdata.h||In member function ‘void wxClientDataDictionaryPairVector::push_back(const wxClientDataDictionaryPair&)’:|
/usr/include/wx-2.8/wx/debug.h|194|warning: typedef ‘wxDummyCheckInt’ locally defined but not used [-Wunused-local-typedefs]|

Solution

  • The -Wunused-local-typedefs warning didn't exist (or at the very least wasn't enabled by default, I don't remember the details any more) when wxWidgets 2.8 was released 7.5 years ago. Please use wxWidgets 3.0.0 instead, it doesn't have these warnings and has tons of new features and bug fixes.