Author Topic: Code::Blocks SVN does not compile with wxWidgets SVN  (Read 3977 times)

Offline Linux_dWiebe

  • Multiple posting newcomer
  • *
  • Posts: 17
Code::Blocks SVN does not compile with wxWidgets SVN
« on: December 07, 2012, 01:13:54 am »
I have been hoping with each new revision of C::B and wx that they would happily work together, but alas, every time C::B compile fails with the following error:

make[6]: Entering directory `/usr/src/build/cb/src/plugins/contrib/wxContribItems/KWIC'
/bin/sh ../../../../../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../../../../../../codeblocks/src/plugins/contrib/wxContribItems/KWIC -I../../../../../src/include -I/usr/local/lib/wx/include/gtk2-unicode-2.9 -I/usr/local/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I../../../../../../../codeblocks/src/plugins/contrib/wxContribItems/KWIC/include  -Ulinux -Uunix  -O2 -ffast-math -DCB_AUTOCONF  -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT xh_kwxangularregulatorhandler.lo -MD -MP -MF .deps/xh_kwxangularregulatorhandler.Tpo -c -o xh_kwxangularregulatorhandler.lo `test -f './src/wx/xrc/xh_kwxangularregulatorhandler.cpp' || echo '../../../../../../../codeblocks/src/plugins/contrib/wxContribItems/KWIC/'`./src/wx/xrc/xh_kwxangularregulatorhandler.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../../../../../../codeblocks/src/plugins/contrib/wxContribItems/KWIC -I../../../../../src/include -I/usr/local/lib/wx/include/gtk2-unicode-2.9 -I/usr/local/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I../../../../../../../codeblocks/src/plugins/contrib/wxContribItems/KWIC/include -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT xh_kwxangularregulatorhandler.lo -MD -MP -MF .deps/xh_kwxangularregulatorhandler.Tpo -c ../../../../../../../codeblocks/src/plugins/contrib/wxContribItems/KWIC/./src/wx/xrc/xh_kwxangularregulatorhandler.cpp  -fPIC -DPIC -o .libs/xh_kwxangularregulatorhandler.o
In file included from ../../../../../../../codeblocks/src/plugins/contrib/wxContribItems/KWIC/./src/wx/xrc/xh_kwxangularregulatorhandler.cpp:26:0:
../../../../../../../codeblocks/src/plugins/contrib/wxContribItems/KWIC/include/wx/KWIC/AngularRegulator.h:27:36: error: invalid use of incomplete type 'class wxControl'
In file included from /usr/local/include/wx-2.9/wx/xrc/xmlreshandler.h:23:0,
                 from /usr/local/include/wx-2.9/wx/xrc/xmlres.h:31,
                 from ../../../../../../../codeblocks/src/plugins/contrib/wxContribItems/KWIC/include/wx/xrc/xh_kwxangularregulatorhandler.h:28,
                 from ../../../../../../../codeblocks/src/plugins/contrib/wxContribItems/KWIC/./src/wx/xrc/xh_kwxangularregulatorhandler.cpp:25:
/usr/local/include/wx-2.9/wx/window.h:70:28: error: forward declaration of 'class wxControl'
../../../../../../../codeblocks/src/plugins/contrib/wxContribItems/KWIC/./src/wx/xrc/xh_kwxangularregulatorhandler.cpp: In member function 'virtual wxObject* kwxAngularRegulatorHandler::DoCreateResource()':
../../../../../../../codeblocks/src/plugins/contrib/wxContribItems/KWIC/./src/wx/xrc/xh_kwxangularregulatorhandler.cpp:69:24: error: no matching function for call to 'kwxAngularRegulatorHandler::SetupWindow(kwxAngularRegulator*&)'
../../../../../../../codeblocks/src/plugins/contrib/wxContribItems/KWIC/./src/wx/xrc/xh_kwxangularregulatorhandler.cpp:69:24: note: candidate is:
In file included from /usr/local/include/wx-2.9/wx/xrc/xmlres.h:31:0,
                 from ../../../../../../../codeblocks/src/plugins/contrib/wxContribItems/KWIC/include/wx/xrc/xh_kwxangularregulatorhandler.h:28,
                 from ../../../../../../../codeblocks/src/plugins/contrib/wxContribItems/KWIC/./src/wx/xrc/xh_kwxangularregulatorhandler.cpp:25:
/usr/local/include/wx-2.9/wx/xrc/xmlreshandler.h:325:10: note: void wxXmlResourceHandler::SetupWindow(wxWindow*)
/usr/local/include/wx-2.9/wx/xrc/xmlreshandler.h:325:10: note:   no known conversion for argument 1 from 'kwxAngularRegulator*' to 'wxWindow*'
../../../../../../../codeblocks/src/plugins/contrib/wxContribItems/KWIC/./src/wx/xrc/xh_kwxangularregulatorhandler.cpp:71:12: error: cannot convert 'kwxAngularRegulator*' to 'wxObject*' in return
In file included from /usr/local/include/wx-2.9/wx/list.h:33:0,
                 from /usr/local/include/wx-2.9/wx/xrc/xmlres.h:22,
                 from ../../../../../../../codeblocks/src/plugins/contrib/wxContribItems/KWIC/include/wx/xrc/xh_kwxangularregulatorhandler.h:28,
                 from ../../../../../../../codeblocks/src/plugins/contrib/wxContribItems/KWIC/./src/wx/xrc/xh_kwxangularregulatorhandler.cpp:25:
/usr/local/include/wx-2.9/wx/object.h: In instantiation of 'T* wxCheckCast(const void*, T*) [with T = kwxAngularRegulator]':
../../../../../../../codeblocks/src/plugins/contrib/wxContribItems/KWIC/./src/wx/xrc/xh_kwxangularregulatorhandler.cpp:47:5:   required from here
/usr/local/include/wx-2.9/wx/object.h:161:5: error: invalid static_cast from type 'kwxAngularRegulator*' to type 'const wxObject*'
make[6]: *** [xh_kwxangularregulatorhandler.lo] Error 1
make[6]: Leaving directory `/usr/src/build/cb/src/plugins/contrib/wxContribItems/KWIC'


I hope you can figure something out from looking at the above, but if you have *any* questions, I will gladly answer them.

Thanks in advance

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Code::Blocks SVN does not compile with wxWidgets SVN
« Reply #1 on: December 07, 2012, 01:26:04 am »
wx2.9 is a development release, so it is not meant for the general usage and C::B is not fully ported to wx2.9, yet.
Why do you insist on using it with 2.9? If you want to port it feel free to provide patches.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Code::Blocks SVN does not compile with wxWidgets SVN
« Reply #2 on: December 07, 2012, 01:54:11 am »
Patch to fix the error; not tested much; not ready to be applied to trunk or branch.
Only tested on XML compiler branch.

This is a work around; NOT a valid fix because headers added in the wrong spot; but it works OK on XML compiler branch.

Tim S.

Patch I applied to get CB to compile with wxWidgets 2.9 trunk; not sure if the patch is the best solution.
Turns out that in wxWidgets 2.9 the header wx/xrc/xmlres.h no longer includes two other headers as a side effect.
These being "wx/xml/xml.h" and "wx/control.h" (the control.h is via the header wx/animate.h included by xmlres.h ).

Tim S.


Code
Index: src/plugins/contrib/wxContribItems/KWIC/include/wx/xrc/xh_kwxangularregulatorhandler.h
===================================================================
--- src/plugins/contrib/wxContribItems/KWIC/include/wx/xrc/xh_kwxangularregulatorhandler.h (revision 8587)
+++ src/plugins/contrib/wxContribItems/KWIC/include/wx/xrc/xh_kwxangularregulatorhandler.h (working copy)
@@ -25,6 +25,7 @@
 #ifndef XH_KWXANGULAREGULATORHANDLER_H_INCLUDED
 #define XH_KWXANGULAREGULATORHANDLER_H_INCLUDED
 
+#include <wx/control.h>
 #include <wx/xrc/xmlres.h>
 
 class kwxAngularRegulatorHandler : public wxXmlResourceHandler
Index: src/plugins/contrib/wxContribItems/KWIC/include/wx/xrc/xh_kwxlinearregulatorhandler.h
===================================================================
--- src/plugins/contrib/wxContribItems/KWIC/include/wx/xrc/xh_kwxlinearregulatorhandler.h (revision 8587)
+++ src/plugins/contrib/wxContribItems/KWIC/include/wx/xrc/xh_kwxlinearregulatorhandler.h (working copy)
@@ -25,6 +25,7 @@
 #ifndef XH_KWXLINEAREGULATORHANDLER_H_INCLUDED
 #define XH_KWXLINEAREGULATORHANDLER_H_INCLUDED
 
+#include <wx/control.h>
 #include <wx/xrc/xmlres.h>
 
 class kwxLinearRegulatorHandler : public wxXmlResourceHandler
Index: src/include/sdk_common.h
===================================================================
--- src/include/sdk_common.h (revision 8587)
+++ src/include/sdk_common.h (working copy)
@@ -96,6 +96,7 @@
     #include <wx/utils.h>
     #include <wx/wfstream.h>
     #include <wx/wxscintilla.h>
+    #include <wx/xml/xml.h>
     #include <wx/xrc/xmlres.h>
 
     // basic headers
« Last Edit: December 07, 2012, 01:57:19 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Linux_dWiebe

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: Code::Blocks SVN does not compile with wxWidgets SVN
« Reply #3 on: December 07, 2012, 02:52:16 am »
Is there a way to make C::B compile with everything but KWIC?