Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: stahta01 on April 11, 2010, 05:42:28 am

Title: [In-Work] Patches needed to Compile Code::Blocks under Cygwin 1.7 wxGTK
Post by: stahta01 on April 11, 2010, 05:42:28 am
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
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
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.
Title: Re: [In-Work] Patches needed to Compile Code::Blocks under Cygwin 1.7 wxGTK
Post by: SharkCZ on April 12, 2010, 11:54:07 am
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
Title: Re: [In-Work] Patches needed to Compile Code::Blocks under Cygwin 1.7 wxGTK
Post by: stahta01 on April 12, 2010, 04:42:47 pm
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.
Title: Re: [In-Work] Patches needed to Compile Code::Blocks under Cygwin 1.7 wxGTK
Post by: Jenna on April 12, 2010, 04:49:10 pm
They use GetTraitsIfExists in trunk and backported this to 2.8
Title: Re: [In-Work] Patches needed to Compile Code::Blocks under Cygwin 1.7 wxGTK
Post by: stahta01 on April 12, 2010, 04:52:00 pm
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.