Author Topic: wxWidgets 3.0 and Code::Blocks files question?  (Read 31965 times)

Online stahta01

  • Lives here!
  • ****
  • Posts: 6663
    • My Best Post
wxWidgets 3.0 and Code::Blocks files question?
« on: October 07, 2013, 08:37:24 pm »
I have a question about wxWidgets 3.0 and Code::Blocks files.

Are we going to create CodeBlocks_wx30.cbp CB project; when wxWidgets 3.0 are released?

Are we going to remove the *_wx29.cbp project files or rename them to *_wx30.cbp at that time?

I am currently using modified *_wx29.cbp project files to build against wxWidgets 3.0 in wxWidgets trunk.

Do you want the patches to change the *_wx29.cbp project files or instead ones adding *_wx30.cbp project files?

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12066
    • Travis build status
Re: wxWidgets 3.0 and Code::Blocks files question?
« Reply #1 on: October 07, 2013, 09:26:28 pm »
I'd vote for patches to modify the wx29 files. There is no need to clutter the tree with another set of files.
(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 ouch

  • Almost regular
  • **
  • Posts: 223
Re: wxWidgets 3.0 and Code::Blocks files question?
« Reply #2 on: October 07, 2013, 10:13:30 pm »
Agreed, 2.9 was never an official version anyway.

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: wxWidgets 3.0 and Code::Blocks files question?
« Reply #3 on: October 07, 2013, 10:23:52 pm »
On windows we already need to set the global wx-variable, why not use it to provide the version-number as well ?
We could provide two sets of project-files one for stable wx (or better for fully supported wx) and one for development wx (or if wx30 is official stable for not fully supported wx). We would need two wx-variables: e.g. wx and wx-dev or similar). At the moment we already have wx and wx29.

On linux it would make sense to have a similar  set of global variables, at the moment I use patched wx29 project-files to make use of my own build of wx-trunk.

With global variables there would be one place to change and not many project-files (with different custom variables, as we have now).

Online stahta01

  • Lives here!
  • ****
  • Posts: 6663
    • My Best Post
Re: wxWidgets 3.0 and Code::Blocks files question?
« Reply #4 on: October 07, 2013, 10:57:33 pm »
On windows we already need to set the global wx-variable, why not use it to provide the version-number as well ?
We could provide two sets of project-files one for stable wx (or better for fully supported wx) and one for development wx (or if wx30 is official stable for not fully supported wx). We would need two wx-variables: e.g. wx and wx-dev or similar). At the moment we already have wx and wx29.

On linux it would make sense to have a similar  set of global variables, at the moment I use patched wx29 project-files to make use of my own build of wx-trunk.

With global variables there would be one place to change and not many project-files (with different custom variables, as we have now).

This sounds like a good third choice to me. I have decided to create a patch that updates the wx29 project-files to use a Global Var called wx_dev.
I plan to do only the 32-bit windows wx29 project-files and the update29.bat files.

Tim S.
« Last Edit: October 08, 2013, 12:24:33 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Online stahta01

  • Lives here!
  • ****
  • Posts: 6663
    • My Best Post
Re: wxWidgets 3.0 and Code::Blocks files question?
« Reply #5 on: October 08, 2013, 01:46:44 pm »
Changed to 32-bit windows files with names like *_wx29.cbp
Old Value
New Value

WX29
WX_DEV

$(WX_VERSION)
$(#WX_DEV.VERSION)

$(WX_SUFFIX)
$(#WX_DEV.SUFFIX)

$(WX_CFG)
$(#WX_DEV.CFG)

Plan to remove these; currently only done in CodeBlocks_wx29.cbp
<Variable name="WX_CFG" value="" />
<Variable name="WX_SUFFIX" value="u" />
<Variable name="WX_VERSION" value="29" />

Will attach patch after testing.


Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: wxWidgets 3.0 and Code::Blocks files question?
« Reply #6 on: October 08, 2013, 02:02:03 pm »
<Variable name="WX_VERSION" value="29" />
Note:
there are one or two projectfiles, where it is called WX_VER instead of WX_VERSION (at least on linux).

Online stahta01

  • Lives here!
  • ****
  • Posts: 6663
    • My Best Post
Re: wxWidgets 3.0 and Code::Blocks files question?
« Reply #7 on: October 08, 2013, 05:36:24 pm »
<Variable name="WX_VERSION" value="29" />
Note:
there are one or two projectfiles, where it is called WX_VER instead of WX_VERSION (at least on linux).

Found this one during testing "Addr2LineUI wx2.9.x" still doing more testing.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Online stahta01

  • Lives here!
  • ****
  • Posts: 6663
    • My Best Post
Re: wxWidgets 3.0 and Code::Blocks files question?
« Reply #8 on: October 09, 2013, 04:02:57 am »
Patch to add missing wxWidgets headers to sdk_common.h. Discovered as a side effect of building wxWidgets trunk using MinGW 4.8.1.

Edit: I had to undefine WX_PRECOMP and comment out including wx/wxprec.h to reduce the PCH size or prevent a bad header from erroring out cc1plus.exe under 4.8.1 and wxWidgets trunk.

They were defined as missing if both of these things held.
1. They were included in a "#ifndef CB_PRECOMP" block.
2. They were required to build the SDK or codeblocks.exe (src/src folder)

Tim S.

Edit: Removed outdated patch.
« Last Edit: October 19, 2013, 07:57:59 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Online stahta01

  • Lives here!
  • ****
  • Posts: 6663
    • My Best Post
Re: wxWidgets 3.0 and Code::Blocks files question?
« Reply #9 on: October 09, 2013, 04:09:18 am »
Attached 7Zipped patch to convert wx29 32-bit windows cbp files to allowing version/suffix/cfg set in global var wx_dev.

I still plan to do more testing; but, my computer is unstable and I am afraid the patch might be lost.

Tim S.

Edit: My method of generating the patch does NOT create patch code the FORTRAN Plug-in.
Edit: Removed outdated patches.

« Last Edit: October 19, 2013, 07:58:37 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline gd_on

  • Regular
  • ***
  • Posts: 488
Re: wxWidgets 3.0 and Code::Blocks files question?
« Reply #10 on: October 09, 2013, 09:11:01 am »
Hi,
I have not still tried your patches, but yesterday I have been able to build a working CodeBlocks on Windows 7 with wxWidgets 3.0.0.rc1, C::B svn 9392, everything compiled with TDM 4.8.1 distribution (32 bits).
To compile wxWidgets 3.0.0 I have made it as with wxWidgets 2.8 :
Code: [Select]
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 USE_OPENGL=1 VENDOR=cb CXXFLAGS="-fno-keep-inline-dllexport" >log.txt 2>&1In the wiki, it is said than for a wxWidgets 2.9 version it's better to add "USE_STC=0 USE_PROPGRID=1", but it's not the case for 3.0 version : if you do that, the dll is not built because some scintilla components are missing.
To build C::B, I have used simply the _wx29 workspace as it is. I have just indicated C:\wxWidgets-3.0.0 in the environment wx29 variable and made a small add in C:\wxWidgets-3.0.0\lib : I copied in C:\wxWidgets-3.0.0\lib\gcc_dll, libwxmsw30u.a and libwxmsw30u_gl.a to libwxmsw29u.a and libwxmsw29u_gl.a respectively (just because in _wx29.cbps wxmsw29u is explicitely used, but they are effectively a 3.0 version). Of course, this is just for a test and stahta01 patches are certainly better than this workaround. Nevertheless, it works.

But, two remaining problems :
as with wxWidgets 2.9.5, there is still a warning concerning assert usage and I experienced one time only a crash, both probably caused by FortranProject plugin (I say that because the warning appears only when  FortranProject plugin is activated, and when I had the crash, in the .RPT file the name of this plugin appeared, but indirectly: not the main cause). The author of this plugin knows already this problem for wxWidgets 2.9.5 !

So, continue the good work. It's on the right way.

gd_on


[attachment deleted by admin]
« Last Edit: October 09, 2013, 09:35:59 am by gd_on »
Windows 10, svn C::B (last version or almost!), WxWidgets 3.1.3, Compilers 8.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\MinGW64) or 32 bits (sjlj, posix in C:\MinGW32).

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: wxWidgets 3.0 and Code::Blocks files question?
« Reply #11 on: October 09, 2013, 09:22:10 am »
Indeed, the crash/assert (shown in your screenshot) is caused by the Fortran-pluin's symbolbrowser, if I remembmer correctly.

Offline gd_on

  • Regular
  • ***
  • Posts: 488
Re: wxWidgets 3.0 and Code::Blocks files question?
« Reply #12 on: October 10, 2013, 04:04:53 pm »
Hi,
I have tried statha01 patches.
It's OK, but it's necessary to define the sub-globals variables WX_DEV.VERSION and WX_DEV.SUFFIX.
You can define them on the right part of the Global Variable Editor by entering "version" and "30" then "suffix" and "u" (without the quotes). Like that it's OK.

The problem I have seen, is that in a first try, I had not set those variables (I thought that C::B will ask them when needed, as it did for WX_DEV the first time!). C::B began to compile and after a while stopped because it said that wx/setup.h cannot be found in Platform.h. That's quite normal, because the path to this file was not correctly set.
But :
1) First thing: I had no messages telling me that WX_DEV.VERSION and/or WX_DEV.SUFFIX was not defined. May be not really easy to do, because there is another variable WX_DEV.CFG in the patches, not defined too, but which is finally (and must be) empty. (as WX_CFG in the different *_wx29.cbp)
2) The second thing is more annoying: After stopping on the line in Platform.h, telling me that wx/setup.h was missing, C::B hanged : no mouse reactions, even closing C::B by clicking the cross on the top of C::B window does not work the first time. If I insist, Windows show me a message indicating that C::B does not respond anymore and propose to kill the process. May be a bug somewhere in C::B ?
I tried this with several configurations of C::B (compiled with tdm 4.7.1, tdm 4.8.1 with the corresponding wxWidgets 2.8.12 configuration). It hanged in each configuration I tried.

gd_on
Windows 10, svn C::B (last version or almost!), WxWidgets 3.1.3, Compilers 8.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\MinGW64) or 32 bits (sjlj, posix in C:\MinGW32).

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9504
Re: wxWidgets 3.0 and Code::Blocks files question?
« Reply #13 on: October 12, 2013, 04:04:32 pm »
Edit: I had to undefine WX_PRECOMP and comment out including wx/wxprec.h to reduce the PCH size or prevent a bad header from erroring out cc1plus.exe under 4.8.1 and wxWidgets trunk.
Ah, that's interesting it seems you are talking about the same bug I reported in the GCC 4.8.1 announcement topic. I'll try your changes...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Online stahta01

  • Lives here!
  • ****
  • Posts: 6663
    • My Best Post
Re: wxWidgets 3.0 and Code::Blocks files question?
« Reply #14 on: October 12, 2013, 04:18:18 pm »
Edit: I had to undefine WX_PRECOMP and comment out including wx/wxprec.h to reduce the PCH size or prevent a bad header from erroring out cc1plus.exe under 4.8.1 and wxWidgets trunk.
Ah, that's interesting it seems you are talking about the same bug I reported in the GCC 4.8.1 announcement topic. I'll try your changes...

I am thinking its multiple headers that are causing the problem instead of size right now; but, I can not make a small sample to confirm this.

Tim S.

 
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org