Author Topic: Build CB with MinGW and configure  (Read 5514 times)

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Build CB with MinGW and configure
« on: May 14, 2007, 09:47:01 pm »
Thread about what's missing to get Code::Blocks compiling with MinGW and autoconf, like it should...

Code
./configure --host=i386-mingw32 --target=mingw32 --enable-contrib



1.
First problem I ran into was with wxScintilla, and WXDLLIMPEXP_SCI not being set in the Makefile.
Code
AM_CPPFLAGS = -DSCI_LEXER -DLINK_LEXERS -DWXMAKINGDLL_SCI -DGTK

Makes you wonder what "GTK" is doing there hard-coded, but that's another story. Left it there for now.
« Last Edit: May 14, 2007, 10:26:12 pm by afb »

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Build CB with MinGW and configure
« Reply #1 on: May 14, 2007, 10:16:46 pm »
2.
There is a warning for all code compiled, so -fPIC should probably be off.

Code
warning: -fPIC ignored for target (all code is position independent)

3.
error: definition of static data member '***::sm_eventTable' of dllimport'd class

The macros from CodeBlocks.cbp are missing:
Code
-DEXPORT_LIB -DEXPORT_EVENTS

4.
binreloc doesn't compile, since it only compiles on Unix and only works on Linux

Code
prefix.cpp:222:21: pthread.h: No such file or directory
« Last Edit: May 14, 2007, 10:18:47 pm by afb »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Build CB with MinGW and configure
« Reply #2 on: May 22, 2007, 02:40:07 am »
FYI:

I am working on a different approach, that of getting wxGTK compiled using minGW/MSys.

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 afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Build CB with MinGW and configure
« Reply #3 on: May 22, 2007, 09:04:35 am »
I am working on a different approach, that of getting wxGTK compiled using minGW/MSys.

That would probably be useful too, I am using that on Mac OS X for testing purposes.
At the moment only X11 works, but the Cocoa port of GTK+ is coming along as well.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Build CB with MinGW and configure
« Reply #4 on: May 24, 2007, 06:33:06 am »
Gave up building GTK+ and wxGTK under MSys, now trying to do Code::Blocks under Cygwin wxGTK.
Looks like wxWidgets requires major changes to get wxGTK to compile under MinGW MSys. I think I could get GTK+ to compile under MinGW MSys with about a week worth of work, but it is so much easier to just download the finished binary and development file so gave up on that.

Tim S

Code::Blocks Patches needed for CygWin wxGTK build. This is not the complete list, still trying to make it. I got a whole bunch of link errors relating to wxScintilla. Going to try an wxWidgets 2.6.3 build next.

The missing WXMAKINGDLL_SCI just like your build.
Code
Index: src/sdk/wxscintilla/Makefile.am
===================================================================
--- src/sdk/wxscintilla/Makefile.am (revision 3989)
+++ 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
+AM_CPPFLAGS = -DSCI_LEXER -DLINK_LEXERS -DGTK -DWXMAKINGDLL_SCI
 
 noinst_LTLIBRARIES = libwxscintilla.la
 
« Last Edit: May 24, 2007, 08:13:22 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