Author Topic: [In-Work] Patches needed to Compile Code::Blocks under Cygwin 1.7 wxGTK  (Read 2744 times)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6610
    • My Best Post
I am once more trying to get Code::Blocks to compile under the Cygwin environment.
This time using a newer Cygwin and the 2.8 branch of wxWidgets.

Past Tries:
http://forums.codeblocks.org/index.php/topic,10540.0.html

Patch 1 to Code::Blocks
Code: [Select]
Index: src/sdk/wxscintilla/Makefile.am
===================================================================
--- src/sdk/wxscintilla/Makefile.am (revision 6202)
+++ src/sdk/wxscintilla/Makefile.am (working copy)
@@ -3,7 +3,7 @@
  -I$(srcdir)/src/scintilla/include \
  -I$(srcdir)/src/scintilla/src
 
-AM_CPPFLAGS = -DSCI_LEXER -DLINK_LEXERS -DGTK -D__WX__
+AM_CPPFLAGS = -DWXMAKINGDLL_SCI -DSCI_LEXER -DLINK_LEXERS -DGTK -D__WX__
 
 noinst_LTLIBRARIES = libwxscintilla.la
 

Patch to wxWidgets 2.8 branch to fix temporary compile bug. Should be fixed in 48 hours by wx devs; I am not taking time to submit my patch; I am not positive it is a valid fix.
Code: [Select]
Index: src/unix/mimetype.cpp
===================================================================
--- src/unix/mimetype.cpp (revision 63936)
+++ src/unix/mimetype.cpp (working copy)
@@ -1527,7 +1527,7 @@
         m_initialized = true;
 
         int mailcapStyles = wxMAILCAP_ALL;
-        if ( wxAppTraits * const traits = wxApp::GetTraitsIfExists() )
+        if ( wxAppTraits * const traits = (wxTheApp ? wxTheApp->GetTraits() : NULL) )
         {
             wxString wm = traits->GetDesktopEnvironment();
 

Tim S.
« Last Edit: June 24, 2010, 04:53:46 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 SharkCZ

  • Almost regular
  • **
  • Posts: 127
The second issue (a.k.a. http://trac.wxwidgets.org/ticket/11927) is fixed in wxWidgets and the fix should be included also in 2.8.11
Code::Blocks package maintainer for Fedora and EPEL

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6610
    • My Best Post
The second issue (a.k.a. http://trac.wxwidgets.org/ticket/11927) is fixed in wxWidgets and the fix should be included also in 2.8.11

How did they fix it; did they add GetTraitsIfExists to wx 2.8 or did the revert the fix?
Or, did they patch it right?

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
They use GetTraitsIfExists in trunk and backported this to 2.8

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6610
    • My Best Post
Did they port the code of GetTraitsIfExists to 2.8 Branch; my patch fixed their patch.

Good they patched their patch with code like my patch; I hope it works, never had time to verify it does more than compile.

Tim S.
« Last Edit: April 12, 2010, 04:58:39 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