Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
cb trunk compile error; missing #include in wxspropertygridmanager.h
blauzahn:
Hello,
when compiling cb-trunk with wxWidgets trunk on Linux (arch) I got a compile error. This started around Mar 10th and has been the same since.
adding
--- Code: ---#include <wx/textctrl.h>
--- End code ---
to src/plugins/contrib/wxSmith/properties/wxspropertygridmanager.h
fixes this.
Have a nice day.
Miguel Gimenez:
Can you post the error?
blauzahn:
As usual, I compile via configure and make using an out-of-tree build directory parallel to trunk. The current wxWidgets trunk installation resides in /op/wx so that it does not collide with the default installed one.
The configure command I have in my Makefile above trunk is:
--- Code: ---mkdir -p build
(cd build && \
LT_SYS_LIBRARY_PATH=/opt/wx/lib \
CC=cc CXX=g++ ../trunk/configure \
--prefix=/usr/local \
--with-wx-config=/opt/wx/bin/wx-config --with-wx-prefix=/opt/wx \
--disable-code-completion \
--with-contrib-plugins=all,-NassiShneiderman,-codesnippets)
--- End code ---
error:
--- Code: ---Making all in wxSmith
make[5]: Entering directory '/home/xyz/software/codeblocks/build/src/plugins/contrib/wxSmith'
Making all in properties
make[6]: Entering directory '/home/xyz/software/codeblocks/build/src/plugins/contrib/wxSmith/properties'
depbase=`echo wxspropertygridmanager.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ../../../../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../../../../../trunk/src/plugins/contrib/wxSmith/properties -I../../../../../src/include -I/opt/wx/lib/wx/include/gtk3-unicode-3.3 -I/opt/wx/include/wx-3.3 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I../../../../../../trunk/src/include -I../../../../../../trunk/src/sdk/wxscintilla/include -DCB_AUTOCONF -DCB_PRECOMP -DPIC -I../../../../../../trunk/src/include/tinyxml -DTIXML_USE_STL=YES -O2 -ffast-math -Winvalid-pch -fPIC -fexceptions -MT wxspropertygridmanager.lo -MD -MP -MF $depbase.Tpo -c -o wxspropertygridmanager.lo ../../../../../../trunk/src/plugins/contrib/wxSmith/properties/wxspropertygridmanager.cpp &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../../../../../../trunk/src/plugins/contrib/wxSmith/properties -I../../../../../src/include -I/opt/wx/lib/wx/include/gtk3-unicode-3.3 -I/opt/wx/include/wx-3.3 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I../../../../../../trunk/src/include -I../../../../../../trunk/src/sdk/wxscintilla/include -DCB_AUTOCONF -DCB_PRECOMP -DPIC -I../../../../../../trunk/src/include/tinyxml -DTIXML_USE_STL=YES -O2 -ffast-math -Winvalid-pch -fPIC -fexceptions -MT wxspropertygridmanager.lo -MD -MP -MF .deps/wxspropertygridmanager.Tpo -c ../../../../../../trunk/src/plugins/contrib/wxSmith/properties/wxspropertygridmanager.cpp -fPIC -DPIC -o .libs/wxspropertygridmanager.o
In file included from ../../../../../../trunk/src/plugins/contrib/wxSmith/properties/wxspropertygridmanager.h:34,
from ../../../../../../trunk/src/plugins/contrib/wxSmith/properties/wxspropertygridmanager.cpp:23:
/opt/wx/include/wx-3.3/wx/propgrid/propgrid.h:764:5: error: 'wxTextCtrl' does not name a type; did you mean 'wxTextEntry'?
764 | wxTextCtrl* GetEditorTextCtrl() const;
| ^~~~~~~~~~
| wxTextEntry
/opt/wx/include/wx-3.3/wx/propgrid/propgrid.h:892:5: error: 'wxTextCtrl' does not name a type; did you mean 'wxTextEntry'?
892 | wxTextCtrl* GetLabelEditor() const
| ^~~~~~~~~~
| wxTextEntry
/opt/wx/include/wx-3.3/wx/propgrid/propgrid.h:1547:5: error: 'wxTextCtrl' does not name a type; did you mean 'wxTextEntry'?
1547 | wxTextCtrl* m_labelEditor;
| ^~~~~~~~~~
| wxTextEntry
make[6]: *** [Makefile:656: wxspropertygridmanager.lo] Error 1
make[6]: Leaving directory '/home/xyz/software/codeblocks/build/src/plugins/contrib/wxSmith/properties'
make[5]: *** [Makefile:836: all-recursive] Error 1
make[5]: Leaving directory '/home/xyz/software/codeblocks/build/src/plugins/contrib/wxSmith'
make[4]: *** [Makefile:641: all-recursive] Error 1
make[4]: Leaving directory '/home/xyz/software/codeblocks/build/src/plugins/contrib'
make[3]: *** [Makefile:535: all-recursive] Error 1
make[3]: Leaving directory '/home/xyz/software/codeblocks/build/src/plugins'
make[2]: *** [Makefile:542: all-recursive] Error 1
make[2]: Leaving directory '/home/xyz/software/codeblocks/build/src'
make[1]: *** [Makefile:674: all-recursive] Error 1
make[1]: Leaving directory '/home/xyz/software/codeblocks/build'
make: *** [Makefile:66: all] Error 2
--- End code ---
I just changed the name of the home-directory for privacy.
Miguel Gimenez:
Looks like this is a wxWidgets issue, propgrid.h should include textctrl.h and do not depend on other code including it.
I will report this on the wx site so the 3.3 release hopefully includes it.
blauzahn:
propgrid.h contains wxTextCtrl only as a pointer. A forward declaration would suffice there. Granted, those translation units that actually ODR-use wxTextCtrl would still have to #include it.
I like minimized coupling and compiletime.
Anyway. Let's see what the wxWidgets maintainer's opinion is.
Thank you for having looked into this.
Navigation
[0] Message Index
[#] Next page
Go to full version