News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Build CB with MinGW and configure

Started by afb, May 14, 2007, 09:47:01 PM

Previous topic - Next topic

afb

Thread about what's missing to get Code::Blocks compiling with MinGW and autoconf, like it should...

./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.

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.

afb

#1
2.
There is a warning for all code compiled, so -fPIC should probably be off.

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:
-DEXPORT_LIB -DEXPORT_EVENTS

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

prefix.cpp:222:21: pthread.h: No such file or directory

stahta01

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++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

afb

Quote from: stahta01 on May 22, 2007, 02:40:07 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.

stahta01

#4
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.

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


C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]