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

Online stahta01

  • Lives here!
  • ****
  • Posts: 6663
    • My Best Post
Re: wxWidgets 3.0 and Code::Blocks files question?
« Reply #15 on: October 12, 2013, 11:46:41 pm »
Here's my current patch for TDM MinGW GCC 4.8.1 and wxWidgets trunk.
Note: This is a Test patch trying to narrow down the cause; not one to apply to CB trunk!

Edit: Removed outdated patch.


Edit: Note: The testing below is NOT doing linking against wxWidgets because building the wxLibs takes to long.
Retested using 4.8.1 Compiler; This exact problem does NOT seem to exist in wxWidgets 2.9.2 (edited wx/wxcrt.h) using TDM MinGW GCC.
Retested using 4.8.1 Compiler; This exact problem does NOT seem to exist in wxWidgets 2.9.3 (edited wx/wxcrt.h) using TDM MinGW GCC.

Tested using 4.8.1 Compiler; This exact problem does seem to exist in wxWidgets 2.9.4 using TDM MinGW GCC.

Testing wxWidgets trunk SVN 70020 to see if problem exists; Did NOT see problem.
Testing wxWidgets trunk SVN 71000 to see if problem exists; Did see the problem.
Testing wxWidgets trunk SVN 70500 to see if problem exists; Did NOT see problem.
Testing wxWidgets trunk SVN 70600 to see if problem exists; Did see the problem.
Testing wxWidgets trunk SVN 70550 to see if problem exists; Did see the problem.
Testing wxWidgets trunk SVN 70520 to see if problem exists; Did see the problem.
Re-Testing wxWidgets trunk SVN 70500 to see if problem exists; Did NOT see problem.
Testing wxWidgets trunk SVN 70503 to see if problem exists; Did NOT see problem.
Testing wxWidgets trunk SVN 70509 to see if problem exists; Did NOT see problem.
Testing wxWidgets trunk SVN 70511 to see if problem exists; Did NOT see problem.
Testing wxWidgets trunk SVN 70512 to see if problem exists; Did NOT see problem.
Testing wxWidgets trunk SVN 70513 to see if problem exists; Did NOT see problem.

Testing wxWidgets trunk SVN 70514 to see if problem exists; Did see the problem.

Likely cause is "include/wx/generic/choicdgg.h"

NOTE: I have given up on solving this problem needs someone better at C++ and the MinGW Compiler to locate the problem to an exact cause.

Cross posted some of this info to http://forums.wxwidgets.org/viewtopic.php?f=19&t=38116 because maybe it will get a better person to try to solve the issue.


Tim S.
« Last Edit: October 19, 2013, 07:59:38 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 ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5230
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: wxWidgets 3.0 and Code::Blocks files question?
« Reply #16 on: October 13, 2013, 05:21:20 am »

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.
Hi, Tim, what do you mean by this?
I see in your patch in the post: http://forums.codeblocks.org/index.php/topic,18412.msg126028.html#msg126028
You remove the include directive of "#include <wx/wxprec.h>", but CB_PRECOMP is still defined. It looks like the generated pch file can be smaller now because not all the header files in "wx/wxprec.h" was included in the pch now.

BTW: I'm not sure the PCH issue is related only GCC 4.8.x under Windows, or the whole GCC versions under Windows. Anyone has the result of GCC 4.6.x and 4.7.x?

For some reasons, I want to build C::B under different Compiler, but the current build method does not let me hold different build folders, all the build files are put under devel folder. Can we have a variable which can relocate the output folder? like #CB_DEVEL or #BUILD, then I can have multiply build folders co-exists for different compilers.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Online stahta01

  • Lives here!
  • ****
  • Posts: 6663
    • My Best Post
Re: wxWidgets 3.0 and Code::Blocks files question?
« Reply #17 on: October 13, 2013, 05:34:47 am »

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.
Hi, Tim, what do you mean by this?
I see in your patch in the post: http://forums.codeblocks.org/index.php/topic,18412.msg126028.html#msg126028
You remove the include directive of "#include <wx/wxprec.h>", but CB_PRECOMP is still defined. It looks like the generated pch file can be smaller now because not all the header files in "wx/wxprec.h" was included in the pch now.

My testing patch shows that when one of the 3 to 5 headers are un-commented along with #include "wx/msw/wrapcctl.h" that the PCH causes the crash in cc1plus.exe.

BTW: I'm not sure the PCH issue is related only GCC 4.8.x under Windows, or the whole GCC versions under Windows. Anyone has the result of GCC 4.6.x and 4.7.x?

I have built using 4.7.1 and the crash from the PCH does not happen; but, the PCH was smaller so it only rules out a header sequence caused issue NOT a PCH size caused issue.

For some reasons, I want to build C::B under different Compiler, but the current build method does not let me hold different build folders, all the build files are put under devel folder. Can we have a variable which can relocate the output folder? like #CB_DEVEL or #BUILD, then I can have multiply build folders co-exists for different compilers.

I think that would work better as a Compiler custom variable than a Global var; but, I have never tried either one for a output folder.
There is about 6 update29.bat files that would be a source of problems to fix.

Tim S.
« Last Edit: October 13, 2013, 06:08:11 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 #18 on: October 14, 2013, 02:19:41 pm »
Patch needed to confirm the (cc1plus.exe has stopped working) Problem exists in TDM MinGW GCC 4.8.1 and wxWidgets 2.9.4.

I think the problem did NOT exist in wxWidgets 2.9.3.

Tim S.

Code: [Select]
Index: src/sdk/wxscintilla/src/wxscintilla.cpp
===================================================================
--- src/sdk/wxscintilla/src/wxscintilla.cpp (revision 9398)
+++ src/sdk/wxscintilla/src/wxscintilla.cpp (working copy)
@@ -5293,7 +5293,7 @@
                         evt.GetWheelDelta(),
                         evt.GetLinesPerAction(),
 /* C::B begin */
-#if wxCHECK_VERSION(2,9,2)
+#if wxCHECK_VERSION(2,9,5)
                         evt.GetColumnsPerAction(),
 #else
                         1,
Index: src/sdk/wxscintilla/src/ScintillaWX.h
===================================================================
--- src/sdk/wxscintilla/src/ScintillaWX.h (revision 9398)
+++ src/sdk/wxscintilla/src/ScintillaWX.h (working copy)
@@ -169,7 +169,7 @@
     void DoMiddleButtonUp(SCI_NAMESPACE_PREFIX(Point) pt);
 /* C::B end */
 /* C::B begin */
-#if !wxCHECK_VERSION(2,9,2)
+#if !wxCHECK_VERSION(2,9,4)
     enum wxMouseWheelAxis
     {
         wxMOUSE_WHEEL_VERTICAL,
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 #19 on: October 19, 2013, 11:34:42 pm »
Patches I am using to test CB trunk and wx trunk compiling with TDM MinGW GCC 4.8.1.
I am moving these patches to this new thread http://forums.codeblocks.org/index.php/topic,18568.0.html

That thread is obsolete; the CB Team applied patches to remove PCH for the wxWidgets 3.x projects which worked around the MinGW GCC 4.8.1 PCH bug.

Tim S.
« Last Edit: January 06, 2014, 10:44:56 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 #20 on: October 29, 2013, 05:44:40 pm »
Patch to SpellChecker_wx30.cbp many things are NOT done correctly in this CB Project file.

Delete patch that is out of date; since most of it has been applied to CB SVN trunk.

Tim S.
« Last Edit: January 06, 2014, 10:42:06 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