Author Topic: Patches to compile and link C::B against wxWidgets 2.8.0  (Read 87600 times)

sethjackson

  • Guest
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #75 on: December 20, 2006, 04:22:50 pm »
The quickest way to see it is to download wxPython 2.8 and its demos.  There is a new wxAUI class called wxAUINotebook (wxWidgets needs to learn namespaces).  Basically every frame becomes a notebook and you can move them between panes, or "tear" one out and create its own pane.  The only thing they don't do currently is become floating windows.  That for later releases.

Yeah I use wxAuiNotebook, but I'm not sure how to make the tabs undock.... Or can they?

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #76 on: December 20, 2006, 07:58:41 pm »
Just click and drag and you be able to place it some where else.  There is no way to make them float.

Offline David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #77 on: December 20, 2006, 09:04:29 pm »
Tearable tabs? How?
You can drag tabs from one window to another, as long as you tell wxAUI where it could be placed...
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

sethjackson

  • Guest
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #78 on: December 20, 2006, 09:53:32 pm »
Just click and drag and you be able to place it some where else.  There is no way to make them float.

Oh ok. Yeah mine do that. I thought you meant you could make the tabs float.... :)

takeshimiya

  • Guest
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #79 on: December 21, 2006, 12:29:13 am »
Just click and drag and you be able to place it some where else.  There is no way to make them float.

Oh ok. Yeah mine do that. I thought you meant you could make the tabs float.... :)
On the other hand, for floating tabs: http://www.eistware.com/aui_dock/wxFlatNotebookTest.zip
  • Edit->Enable Drag And Drop of Tabs
  • Edit->Enable Drag And Drop of Tabs to foreign notebooks[/tt]

    so guess that'll made its way to wxAuiNotebook.

Offline SharkCZ

  • Almost regular
  • **
  • Posts: 131
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #80 on: December 23, 2006, 02:56:20 pm »
I am trying to compile C::B on Fedora Development with wxGTK 2.8.0 (all patches from the first post in this thread are applied) and I am getting an error when compiling PropertyGrid. Any idea?

Code
/bin/sh ../../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../../src/sdk -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I../../../src/sdk/propgrid/include    -O2 -ffast-math -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -MT propgrid.lo -MD -MP -MF .deps/propgrid.Tpo -c -o propgrid.lo `test -f './src/propgrid/propgrid.cpp' || echo './'`./src/propgrid/propgrid.cpp
 g++ -DHAVE_CONFIG_H -I. -I../../../src/sdk -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I../../../src/sdk/propgrid/include -O2 -ffast-math -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -MT propgrid.lo -MD -MP -MF .deps/propgrid.Tpo -c ./src/propgrid/propgrid.cpp  -fPIC -DPIC -o .libs/propgrid.o
/usr/include/wx-2.8/wx/hashmap.h: In member function 'wxLongToLongHashMap_wxImplementation_HashTable::Node** wxLongToLongHashMap_wxImplementation_HashTable::GetNodePtr(const long int&) const':
/usr/include/wx-2.8/wx/hashmap.h:714: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/include/wx-2.8/wx/clntdata.h: In member function 'wxShadowObjectMethods_wxImplementation_HashTable::Node** wxShadowObjectMethods_wxImplementation_HashTable::GetNodePtr(const wxString&) const':
/usr/include/wx-2.8/wx/clntdata.h:20: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/include/wx-2.8/wx/clntdata.h: In member function 'wxShadowObjectFields_wxImplementation_HashTable::Node** wxShadowObjectFields_wxImplementation_HashTable::GetNodePtr(const wxString&) const':
/usr/include/wx-2.8/wx/clntdata.h:25: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/include/wx-2.8/wx/gdicmn.h: In member function 'wxStringToColourHashMap_wxImplementation_HashTable::Node** wxStringToColourHashMap_wxImplementation_HashTable::GetNodePtr(const wxString&) const':
/usr/include/wx-2.8/wx/gdicmn.h:540: warning: dereferencing type-punned pointer will break strict-aliasing rules
../../../src/sdk/propgrid/include/wx/propgrid/propgrid.h: In member function 'wxPGHashMapS2P_wxImplementation_HashTable::Node** wxPGHashMapS2P_wxImplementation_HashTable::GetNodePtr(const wxString&) const':
../../../src/sdk/propgrid/include/wx/propgrid/propgrid.h:1644: warning: dereferencing type-punned pointer will break strict-aliasing rules
../../../src/sdk/propgrid/include/wx/propgrid/propgrid.h: In member function 'wxPGHashMapI2I_wxImplementation_HashTable::Node** wxPGHashMapI2I_wxImplementation_HashTable::GetNodePtr(const size_t&) const':
../../../src/sdk/propgrid/include/wx/propgrid/propgrid.h:1668: warning: dereferencing type-punned pointer will break strict-aliasing rules
./src/propgrid/propgrid.cpp: In member function 'wxPGHashMapConstants_wxImplementation_HashTable::Node** wxPGHashMapConstants_wxImplementation_HashTable::GetNodePtr(const size_t&) const':
./src/propgrid/propgrid.cpp:988: warning: dereferencing type-punned pointer will break strict-aliasing rules
./src/propgrid/propgrid.cpp: In member function 'void wxArrayEditorDialog::OnDownClick(wxCommandEvent&)':
./src/propgrid/propgrid.cpp:2414: warning: comparison between signed and unsigned integer expressions
./src/propgrid/propgrid.cpp: In member function 'void wxPGProperty::ShowError(const wxString&)':
./src/propgrid/propgrid.cpp:2942: error: invalid static_cast from type 'wxWindow*' to type 'const wxFrame*'
./src/propgrid/propgrid.cpp:2942: error: incomplete type 'wxFrame' used in nested name specifier
./src/propgrid/propgrid.cpp:2945: error: invalid use of undefined type 'struct wxFrame'
/usr/include/wx-2.8/wx/log.h:74: error: forward declaration of 'struct wxFrame'
./src/propgrid/propgrid.cpp: In member function 'void wxPropertyGrid::DrawItems(wxDC&, unsigned int, unsigned int, const wxRect*)':
./src/propgrid/propgrid.cpp:7568: warning: 'BeginDrawing' is deprecated (declared at /usr/include/wx-2.8/wx/dc.h:392)
./src/propgrid/propgrid.cpp:7576: warning: 'EndDrawing' is deprecated (declared at /usr/include/wx-2.8/wx/dc.h:393)
./src/propgrid/propgrid.cpp: In member function 'void wxPropertyGrid::DoDrawItems(wxDC&, wxPGProperty*, wxPGProperty*, const wxRect*)':
./src/propgrid/propgrid.cpp:7781: warning: 'BeginDrawing' is deprecated (declared at /usr/include/wx-2.8/wx/dc.h:392)
./src/propgrid/propgrid.cpp:8518: warning: 'EndDrawing' is deprecated (declared at /usr/include/wx-2.8/wx/dc.h:393)
./src/propgrid/propgrid.cpp:8522: warning: 'BeginDrawing' is deprecated (declared at /usr/include/wx-2.8/wx/dc.h:392)
./src/propgrid/propgrid.cpp:8528: warning: 'EndDrawing' is deprecated (declared at /usr/include/wx-2.8/wx/dc.h:393)
./src/propgrid/propgrid.cpp: In member function 'void wxPropertyGrid::DrawItems(wxPGProperty*, wxPGProperty*)':
./src/propgrid/propgrid.cpp:8570: warning: 'BeginDrawing' is deprecated (declared at /usr/include/wx-2.8/wx/dc.h:392)
./src/propgrid/propgrid.cpp:8575: warning: 'EndDrawing' is deprecated (declared at /usr/include/wx-2.8/wx/dc.h:393)
./src/propgrid/propgrid.cpp: In member function 'void wxPropertyGrid::SelectProperty(wxPGProperty*, bool, bool, bool)':
./src/propgrid/propgrid.cpp:9900: error: invalid static_cast from type 'wxWindow*' to type 'const wxFrame*'
./src/propgrid/propgrid.cpp:9900: error: incomplete type 'wxFrame' used in nested name specifier
./src/propgrid/propgrid.cpp:9902: error: invalid use of undefined type 'struct wxFrame'
/usr/include/wx-2.8/wx/log.h:74: error: forward declaration of 'struct wxFrame'
make[4]: *** [propgrid.lo] Error 1
make[4]: Leaving directory `/builddir/build/BUILD/codeblocks/src/sdk/propgrid'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/builddir/build/BUILD/codeblocks/src/sdk'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/builddir/build/BUILD/codeblocks/src/sdk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/builddir/build/BUILD/codeblocks/src'
make: *** [all-recursive] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.59823 (%build)
Code::Blocks package maintainer for Fedora and EPEL

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #81 on: December 23, 2006, 03:09:44 pm »
You might try the newest wxPropertyGrid  version 1.2.5
http://sourceforge.net/project/showfiles.php?group_id=133406

I looked up the line that errored out on you and it is the same code in version 1.2.5, so it is NOT likely to fix the problem.

I will try to see what the issue is with the patch to PropertyGrid under Linux.
I use andLinux Ubuntu; are you building it using code::blocks or the auto tools?

If you do use wxPropertyGrid 1.2.5; I have a patch for the new wxSmith that fixes compile and link errors under windows.
https://developer.berlios.de/patch/?func=detailpatch&patch_id=1702&group_id=5358

Tim S
« Last Edit: December 23, 2006, 03:41:23 pm 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 SharkCZ

  • Almost regular
  • **
  • Posts: 131
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #82 on: December 23, 2006, 04:28:34 pm »
You might try the newest wxPropertyGrid  version 1.2.5
http://sourceforge.net/project/showfiles.php?group_id=133406

I looked up the line that errored out on you and it is the same code in version 1.2.5, so it is NOT likely to fix the problem.

I will try to see what the issue is with the patch to PropertyGrid under Linux.
I use andLinux Ubuntu; are you building it using code::blocks or the auto tools?

I am using autotools. The version 1.2.5 looks better as there are not any other warnings only the casting errors and I suspect the problem to be some incompatibility with GCC 4.1.1
Code::Blocks package maintainer for Fedora and EPEL

Offline SharkCZ

  • Almost regular
  • **
  • Posts: 131
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #83 on: December 25, 2006, 05:37:00 pm »
Now I have tried to include the development snapshot of wxPropertyGrid and it compiles OK. Their changelog contains some "compatibilty fixes for WX 2.8.0" :-)
Code::Blocks package maintainer for Fedora and EPEL

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #84 on: December 25, 2006, 06:01:51 pm »
Now I have tried to include the development snapshot of wxPropertyGrid and it compiles OK. Their changelog contains some "compatibilty fixes for WX 2.8.0" :-)

Thanks for the feedback, I have NOT yet had time to test under andLinux. Will look at their patches.

Tim S
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 SharkCZ

  • Almost regular
  • **
  • Posts: 131
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #85 on: December 25, 2006, 06:32:47 pm »
The wxPropertyGrid need this one-liner :-)
Code
--- src/sdk/propgrid/src/propgrid/propgrid.cpp.orig	2006-12-25 17:41:15.000000000 +0100
+++ src/sdk/propgrid/src/propgrid/propgrid.cpp 2006-12-25 17:41:26.000000000 +0100
@@ -50,6 +50,7 @@
     #include "wx/filedlg.h"
     #include "wx/statusbr.h"
     #include "wx/intl.h"
+    #include "wx/frame.h"
 #endif
 
 #include <wx/filename.h>

Another problem is in sdk/globals.cpp (it is platform dependent) - CentreOnScreen() doesn't exist for wxWindow, patch is here:
Code
--- src/sdk/globals.cpp.orig	2006-12-25 17:54:36.000000000 +0100
+++ src/sdk/globals.cpp 2006-12-25 17:55:41.000000000 +0100
@@ -759,12 +759,16 @@
 
     if(the_mode == pdlCentre || the_mode == pdlHead)
     {
+#if wxCHECK_VERSION(2, 8, 0)
+        w->CentreOnParent();
+#else
         if(w->GetParent())
             w->CentreOnParent(); // poo!
         else
             w->CentreOnScreen();
 
         return;
+#endif
     }
     else
     {

And now I am stuck on wxSmith
Code
 g++ -DHAVE_CONFIG_H -I. -I../../../../../src/sdk -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I../../../../../src/sdk -I../../../../../src/sdk/wxscintilla/include -I../../../../../src/sdk/propgrid/include -O2 -ffast-math -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -MT wxsstdmanager.lo -MD -MP -MF .deps/wxsstdmanager.Tpo -c wxsstdmanager.cpp  -fPIC -DPIC -o .libs/wxsstdmanager.o
../properties/wxsstringlistcheckproperty.h: In member function 'void wxsArrayBool::resize(size_t, _wxArraywxsArrayBool)':
../properties/wxsstringlistcheckproperty.h:13: error: no matching function for call to 'wxsArrayBool::resize(size_t&, _wxArraywxsArrayBool&)'
/usr/include/wx-2.8/wx/dynarray.h:809: note: candidates are: void wxBaseArrayPtrVoid::resize(size_t, const void*)
Code::Blocks package maintainer for Fedora and EPEL

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #86 on: December 26, 2006, 11:38:21 pm »


And now I am stuck on wxSmith
Code
 g++ -DHAVE_CONFIG_H -I. -I../../../../../src/sdk -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I../../../../../src/sdk -I../../../../../src/sdk/wxscintilla/include -I../../../../../src/sdk/propgrid/include -O2 -ffast-math -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -MT wxsstdmanager.lo -MD -MP -MF .deps/wxsstdmanager.Tpo -c wxsstdmanager.cpp  -fPIC -DPIC -o .libs/wxsstdmanager.o
../properties/wxsstringlistcheckproperty.h: In member function 'void wxsArrayBool::resize(size_t, _wxArraywxsArrayBool)':
../properties/wxsstringlistcheckproperty.h:13: error: no matching function for call to 'wxsArrayBool::resize(size_t&, _wxArraywxsArrayBool&)'
/usr/include/wx-2.8/wx/dynarray.h:809: note: candidates are: void wxBaseArrayPtrVoid::resize(size_t, const void*)

The error looks easy but I could NOT figure it out in two hours, so I gave up. I have the New wxSmith working under wxW 2.8, I don't use wxSmith so it could have issues.

Tim S
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 stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #87 on: December 27, 2006, 03:12:26 am »
The wxPropertyGrid need this one-liner :-)
Code
--- src/sdk/propgrid/src/propgrid/propgrid.cpp.orig	2006-12-25 17:41:15.000000000 +0100
+++ src/sdk/propgrid/src/propgrid/propgrid.cpp 2006-12-25 17:41:26.000000000 +0100
@@ -50,6 +50,7 @@
     #include "wx/filedlg.h"
     #include "wx/statusbr.h"
     #include "wx/intl.h"
+    #include "wx/frame.h"
 #endif
 
 #include <wx/filename.h>


I updated by patch [ Patch #1739 ] wxPropertyGrid patch for wxWidgets 2.8 for this issue, needs tested.
  https://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=1739&group_id=5358

Another problem is in sdk/globals.cpp (it is platform dependent) - CentreOnScreen() doesn't exist for wxWindow, patch is here:
Code
--- src/sdk/globals.cpp.orig	2006-12-25 17:54:36.000000000 +0100
+++ src/sdk/globals.cpp 2006-12-25 17:55:41.000000000 +0100
@@ -759,12 +759,16 @@
 
     if(the_mode == pdlCentre || the_mode == pdlHead)
     {
+#if wxCHECK_VERSION(2, 8, 0)
+        w->CentreOnParent();
+#else
         if(w->GetParent())
             w->CentreOnParent(); // poo!
         else
             w->CentreOnScreen();
 
         return;
+#endif
     }
     else
     {

Created new patch for this using different solution, needs tested.
[ Patch #1762 ] CentreOnScreen patch for wxWidgets 2.8 Submitted By: stahta01
   https://developer.berlios.de/patch/?func=detailpatch&patch_id=1762&group_id=5358

Tim S
« Last Edit: December 27, 2006, 03:14:39 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 SharkCZ

  • Almost regular
  • **
  • Posts: 131
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #88 on: December 27, 2006, 11:34:18 am »
I have disabled building of wxSmith plugin and now I am able to successfully compile C::B svn3406 (nightly build from 20/12/2006) on Fedora Development with WX 2.8. Now other patches were required.
Code::Blocks package maintainer for Fedora and EPEL

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: Patches to compile and link C::B against wxWidgets 2.8.0
« Reply #89 on: December 27, 2006, 05:28:04 pm »
I applied most of the patches in svn, some I did local on my machine [the scripting one and the cbp's and for selecttarget I have disabled the event handler mapping to the old OnOK for the moment ] => I can build except wxSmith. Any news on that one ?