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

Compiling C::B wit wx2.9

Started by BlueHazzard, February 27, 2013, 10:38:36 PM

Previous topic - Next topic

BlueHazzard

I know that wx2.9 isn't supported, but i am keeping on trying ;)
if i complie c::b unix wx 2.9 i get a lot of errors like:
trunk/src/src/environmentsettingsdlg.cpp|263|error: invalid use of incomplete type 'struct wxAuiDockArt'|
/usr/local/include/wx-2.9/wx/aui/framemanager.h|130|error: forward declaration of 'struct wxAuiDockArt'|


if i add
#include <wx/aui/dockart.h>

it compiles without errors....

bug?

oBFusCATed

Probably, but please use one of the other topics about wx2.9.
(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!]

BlueHazzard

what other topic? i searched but the newest was from 08.2012... i don't dig in tombs

any way a other bug:
to compile the contributed plugins:
cctest:
the wrong search directory for libraries: there is devel but should be devel29

oBFusCATed

Quote from: BlueHazzard on February 27, 2013, 10:59:57 PM
what other topic? i searched but the newest was from 08.2012... i don't dig in tombs
This is relatively new...

Quote from: BlueHazzard on February 27, 2013, 10:59:57 PM
any way a other bug:
to compile the contributed plugins:
cctest:
the wrong search directory for libraries: there is devel but should be devel29
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!]

ouch

actually cctest compiled fine for me.

but the exporter stops at the pdf part:

mingw32-g++.exe -DWXMAKINGLIB_PDFDOC -Wall -O2 -Winvalid-pch -mthreads -fexceptions -DHAVE_W32API_H -D__WXMSW__ -DWX_PRECOMP -DWXUSINGDLL -DwxUSE_UNICODE -DWXMAKINGDLL_PDFDOC -DwxPDF_USE_WXMODULE=0 -IC:\Programming\wxWidgets\wxWidgets\include -IC:\Programming\wxWidgets\wxWidgets\lib\gcc_dll\mswu -IwxPdfDocument\include -c C:\Programming\codeblocks\src\plugins\contrib\source_exporter\wxPdfDocument\src\pdffont.cpp -o ..\..\..\.objs29\plugins\contrib\source_exporter\wxPdfDocument\src\pdffont.o
C:\Programming\codeblocks\src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfencrypt.cpp: In function 'void MD5Final(unsigned char*, MD5_CTX*)':
C:\Programming\codeblocks\src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfencrypt.cpp:188:32: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
C:\Programming\codeblocks\src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfencrypt.cpp:189:32: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
In file included from C:\Programming\codeblocks\src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfdc.cpp:26:0:
C:\Programming\codeblocks\src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfdc29.inc: In constructor 'wxPdfDC::wxPdfDC()':
C:\Programming\codeblocks\src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfdc29.inc:30:30: error: cannot allocate an object of abstract type 'wxPdfDCImpl'
In file included from wxPdfDocument\include/wx/pdfdc.h:36:0,
                 from C:\Programming\codeblocks\src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfdc29.inc:17,
                 from C:\Programming\codeblocks\src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfdc.cpp:26:
wxPdfDocument\include/wx/pdfdc29.h:40:26: note:   because the following virtual functions are pure within 'wxPdfDCImpl':
In file included from C:\Programming\wxWidgets\wxWidgets\include/wx/wx.h:51:0,
                 from C:\Programming\wxWidgets\wxWidgets\include/wx/wxprec.h:59,
                 from C:\Programming\codeblocks\src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfdc.cpp:14:
C:\Programming\wxWidgets\wxWidgets\include/wx/dc.h:607:18: note: virtual void wxDCImpl::DoDrawLines(int, const wxPoint*, wxCoord, wxCoord)
C:\Programming\wxWidgets\wxWidgets\include/wx/dc.h:612:18: note: virtual void wxDCImpl::DoDrawPolygon(int, const wxPoint*, wxCoord, wxCoord, wxPolygonFillMode)
In file included from C:\Programming\codeblocks\src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfdc.cpp:26:0:
C:\Programming\codeblocks\src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfdc29.inc: In constructor 'wxPdfDC::wxPdfDC(const wxPrintData&)':
C:\Programming\codeblocks\src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfdc29.inc:35:41: error: cannot allocate an object of abstract type 'wxPdfDCImpl'
In file included from wxPdfDocument\include/wx/pdfdc.h:36:0,
                 from C:\Programming\codeblocks\src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfdc29.inc:17,
                 from C:\Programming\codeblocks\src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfdc.cpp:26:
wxPdfDocument\include/wx/pdfdc29.h:40:26: note:   since type 'wxPdfDCImpl' has pure virtual functions
In file included from C:\Programming\codeblocks\src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfdc.cpp:26:0:
C:\Programming\codeblocks\src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfdc29.inc: In constructor 'wxPdfDC::wxPdfDC(wxPdfDocument*, double, double)':
C:\Programming\codeblocks\src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfdc29.inc:40:74: error: cannot allocate an object of abstract type 'wxPdfDCImpl'
In file included from wxPdfDocument\include/wx/pdfdc.h:36:0,
                 from C:\Programming\codeblocks\src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfdc29.inc:17,
                 from C:\Programming\codeblocks\src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfdc.cpp:26:
wxPdfDocument\include/wx/pdfdc29.h:40:26: note:   since type 'wxPdfDCImpl' has pure virtual functions


I've attached a patch to fix the missing header issue.

But I'm not sure how you want to go about fixing this, I think the author might have to handle that one.

stahta01

#5
Possible patch for the missing header issue above.
NOT Tested.

FYI: wx/aui/aui.h is NOT in sdk_common.h therefore it should NOT be guarded by CB_PRECOMP.
wx/aui/aui.h includes "wx/aui/dockart.h" and several other headers; it does nothing but include other headers.

Tim S.


Index: src/src/environmentsettingsdlg.cpp
===================================================================
--- src/src/environmentsettingsdlg.cpp (revision 8888)
+++ src/src/environmentsettingsdlg.cpp (working copy)
@@ -10,7 +10,6 @@
#include <sdk.h>

#ifndef CB_PRECOMP
-    #include <wx/aui/aui.h>
    #include <wx/button.h>
    #include <wx/menu.h>
    #include <wx/radiobut.h>
@@ -39,6 +38,7 @@
    #include "cbauibook.h"
#endif

+#include <wx/aui/aui.h>
#include <wx/listbook.h>

#include "configurationpanel.h"
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]

BlueHazzard

thanks you for the patches
i was also at the wxPDF errors, but i tried to use the compiled c::b and i got an floating-point exception at startup, so i try to fix this first.
The crash occurred on wxWidgets startup, i think in the aui part.....

i try to fix this error with the help of the wxWidgets forum.

Quote from: ouch on February 28, 2013, 11:03:39 PM
actually cctest compiled fine for me.

this can be if you compiled c::b before with wx2.8. because the searchpath (if not fixed in the actual svn) for the libcodeblocks0 is definitively wrong.

thanks!

Jenna

Just for the record:
Which version of wx2.9 do you use ?
2.9.4 (the actual developer-release) or 2.9 from trunk, which is under heavy development ?

stahta01

Untested Patch


Index: src/plugins/codecompletion/cctest_wx29-unix.cbp
===================================================================
--- src/plugins/codecompletion/cctest_wx29-unix.cbp (revision 8890)
+++ src/plugins/codecompletion/cctest_wx29-unix.cbp (working copy)
@@ -43,7 +43,7 @@
<Linker>
<Add library="codeblocks" />
<Add option="`$(WX_CONFIG) --libs std,propgrid`" />
- <Add directory="../../devel" />
+ <Add directory="../../devel29" />
</Linker>
<Unit filename="cctest/cctest_app.cpp" />
<Unit filename="cctest/cctest.cpp" />


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]

BlueHazzard

Quote from: jens on March 01, 2013, 08:36:10 PM
Just for the record:
Which version of wx2.9 do you use ?
2.9.4 (the actual developer-release) or 2.9 from trunk, which is under heavy development ?

wx2.9_svn because someone in the wxforum told me to not use 2.9.4 but the actual svn version....

Quote from: stahta01 on March 01, 2013, 08:46:18 PM
Untested Patch

this should work ;)

Jenna

Thanks, I just compiled C::B under linux with actual wx2.9 svn.

At least building the project is okay now.
I will run it, but do not expect it to work errorfree.

Next step is to check autotools, whether they still work.

Jenna

Quote from: BlueHazzard on March 01, 2013, 08:25:33 PM
thanks you for the patches
i was also at the wxPDF errors, but i tried to use the compiled c::b and i got an floating-point exception at startup, so i try to fix this first.
The crash occurred on wxWidgets startup, i think in the aui part.....

i try to fix this error with the help of the wxWidgets forum.

Quote from: ouch on February 28, 2013, 11:03:39 PM
actually cctest compiled fine for me.

this can be if you compiled c::b before with wx2.8. because the searchpath (if not fixed in the actual svn) for the libcodeblocks0 is definitively wrong.

thanks!
The pdf-exporter part is fixed in my local copy.

I do not get any exceptions, just warnings about format-strings, but they should be fixable.

Did you clean the .pch directory when (re-)building wxwidgets ?
Did you install wxWidgets, or do you run wx-config from the build-folder (normally recommended) ?

utelle

Quote from: jens on March 01, 2013, 10:01:06 PM
The pdf-exporter part is fixed in my local copy.

I do not get any exceptions, just warnings about format-strings, but they should be fixable.

[...]
It would be a good idea to send me the patches required to fix the problems in wxPdfDC, so that I can incorporate them in wxPdfDocument for the next release.

It was stated that wxWidgets-SVN is used to compile C::B. wxPdfDocument is developed and tested against official wxWidgets releases only (i.e. 2.8.12 and 2.9.4), since I don't have the time to keep it in sync with wxWidgets-SVN which is really a moving target.

Regards,

Ulrich

Jenna

Quote from: utelle on March 01, 2013, 10:48:34 PM
Quote from: jens on March 01, 2013, 10:01:06 PM
The pdf-exporter part is fixed in my local copy.

I do not get any exceptions, just warnings about format-strings, but they should be fixable.

[...]
It would be a good idea to send me the patches required to fix the problems in wxPdfDC, so that I can incorporate them in wxPdfDocument for the next release.

It was stated that wxWidgets-SVN is used to compile C::B. wxPdfDocument is developed and tested against official wxWidgets releases only (i.e. 2.8.12 and 2.9.4), since I don't have the time to keep it in sync with wxWidgets-SVN which is really a moving target.

Regards,

Ulrich

I attach the patch, I just committed to trunk.
Basically the issue is, that the wxDCImpl base class now wants the wxPoint-array as const.

ouch

svn 8898 builds fine, Thanks everyone!

I get an assertion on a wxchecklistbox right off the bat though. Anyone else get this or is it just because I'm loading an older wx2.8 project file?