News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Code::Blocks SVN does not compile with wxWidgets SVN

Started by Linux_dWiebe, December 07, 2012, 01:13:54 AM

Previous topic - Next topic

Linux_dWiebe

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

oBFusCATed

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!]

stahta01

#2
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.

Quote from: stahta01 on November 28, 2012, 03:18:09 AM
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.



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
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Linux_dWiebe

Is there a way to make C::B compile with everything but KWIC?