2001-02-28 19:59:16 +00:00
|
|
|
Compiling GNUstep on MinGW
|
|
|
|
==========================
|
|
|
|
|
|
|
|
MinGW is a collection of header files and import libraries that allow
|
|
|
|
one to use GCC and produce native Windows32 programs that do not rely
|
|
|
|
on any 3rd-party DLLs. GNUstep has only partially been ported to MinGW
|
|
|
|
so expect some problems when trying to compile. Also, there are still
|
|
|
|
subtle problems with running GNU tools on Windows, so any problems you
|
|
|
|
may encounter may just as easly have to do with the compilation tools
|
|
|
|
you are using as with GNUstep.
|
|
|
|
|
2001-05-29 03:37:46 +00:00
|
|
|
The base library is not completely ported to run on MinGW yet.
|
|
|
|
In particular, anything using sockets, RunLoops and FileHandles will probably
|
|
|
|
not work.
|
|
|
|
|
|
|
|
Note for compiling with shared libraries (DLLs), it's a good idea to
|
|
|
|
remove the libobjc.a that comes with gcc (gcc -v for location) so that
|
|
|
|
it isn't accidentally found instead of the libobjc DLL that you will
|
2001-09-25 15:16:27 +00:00
|
|
|
compile below. Also note that, despite the statement in the GNUstep-HOWTO,
|
|
|
|
even if you have 3.x, you still need to install gnustep-objc as it properly
|
|
|
|
exports symbols for DLLs.
|
2001-05-29 03:37:46 +00:00
|
|
|
|
2001-02-28 19:59:16 +00:00
|
|
|
MinGW on Cygwin
|
|
|
|
---------------
|
|
|
|
|
2001-07-19 15:05:02 +00:00
|
|
|
This is the only configuration I've tested so far. This method uses
|
|
|
|
the Cygwin tools to help out with the configuration and compilation of
|
|
|
|
the libraries. It's always good to get the very latest version of
|
2001-07-26 18:34:42 +00:00
|
|
|
Cygwin and MinGW. These instructions were performed
|
|
|
|
with Cygwin DLL 1.3.2 and MingW gcc 2.95.3-5. If you have more
|
2001-07-19 15:05:02 +00:00
|
|
|
experience with MinGW than me, please help improve these instructions!
|
2001-02-28 19:59:16 +00:00
|
|
|
|
|
|
|
I assume you have installed Cygwin and MinGW, and dowloaded and
|
2001-07-26 18:34:42 +00:00
|
|
|
unpacked the GNUstep packages:
|
|
|
|
|
|
|
|
ffcall
|
|
|
|
gnustep-make
|
|
|
|
gnustep-objc
|
|
|
|
gnustep-base
|
|
|
|
|
|
|
|
See the GNUstep-HOWTO file for more information on where to get
|
|
|
|
various files.
|
2001-02-28 19:59:16 +00:00
|
|
|
|
|
|
|
1. First, start up a Cygwin BASH shell and make sure the MinGW tools
|
|
|
|
are in your path:
|
|
|
|
|
2001-04-10 03:19:42 +00:00
|
|
|
export PATH=//c/mingw/bin:$PATH
|
2001-02-28 19:59:16 +00:00
|
|
|
|
2001-07-26 18:34:42 +00:00
|
|
|
(Put in whatever path you have for the mingw tools). This is also a good
|
|
|
|
time to compile and install the ffcall package (Version 1.8b or above). It's
|
|
|
|
simply a C library so it requires no special tools other than the compiler.
|
|
|
|
For MinGW, configure the ffcall package like this:
|
|
|
|
|
|
|
|
./configure --host=i386-mingw32 --prefix=//c/mingw
|
|
|
|
|
|
|
|
(or set the prefix to some other location that is in the compiler search path).
|
|
|
|
Then
|
|
|
|
|
|
|
|
make
|
|
|
|
make install
|
2001-02-28 19:59:16 +00:00
|
|
|
|
2001-08-21 15:06:00 +00:00
|
|
|
NOTES: On some systems, configure has trouble when mingw's bin is in the
|
|
|
|
path (probably because of mingw's make).
|
|
|
|
|
2001-02-28 19:59:16 +00:00
|
|
|
2. The default location for GNUstep on Unix systems in /usr/GNUstep, but
|
|
|
|
there is no default for Windows machines, so you need to set that up
|
|
|
|
first with the GNUSTEP_SYSTEM_ROOT environment variable. To put it in
|
|
|
|
a similar location, you might try:
|
|
|
|
|
2001-04-10 03:19:42 +00:00
|
|
|
export GNUSTEP_SYSTEM_ROOT=//c/mingw/GNUstep/System
|
2001-02-28 19:59:16 +00:00
|
|
|
|
|
|
|
But you can put it anywhere you like (as long as you specify the full
|
|
|
|
path with the disk label so MinGW can find it). You can also specify this
|
2001-04-10 03:19:42 +00:00
|
|
|
with configure, using the --prefix=//c/mingw/GNUstep/System option.
|
2001-02-28 19:59:16 +00:00
|
|
|
|
2001-04-10 03:19:42 +00:00
|
|
|
3. You need to build and install each sub-package separately. So
|
|
|
|
first, go to the 'gnustep-make' package and configure:
|
2001-02-28 19:59:16 +00:00
|
|
|
|
2001-04-10 03:19:42 +00:00
|
|
|
cd gnustep-make
|
2001-02-28 19:59:16 +00:00
|
|
|
./configure --target=i386-mingw32
|
|
|
|
|
2001-04-10 03:19:42 +00:00
|
|
|
4. Now build the gnustep-make package. Occationally, the make that comes
|
2001-02-28 19:59:16 +00:00
|
|
|
with MinGW doesn't like the way GNUstep makefiles are setup (or perhaps
|
2001-04-10 03:19:42 +00:00
|
|
|
it's that MingW make doesn't work with bash), so you can try
|
|
|
|
using Cygwin's make instead:
|
2001-02-28 19:59:16 +00:00
|
|
|
|
|
|
|
/usr/bin/make target=i386-mingw32
|
|
|
|
/usr/bin/make target=i386-mingw32 install
|
|
|
|
|
|
|
|
5. Now source the GNUstep.sh file so the rest of the packages will
|
|
|
|
compile correctly:
|
|
|
|
|
|
|
|
. $GNUSTEP_SYSTEM_ROOT/Makefiles/GNUstep.sh
|
|
|
|
|
2001-07-26 18:34:42 +00:00
|
|
|
Also put this command in your shell startup script.
|
2001-08-03 16:29:42 +00:00
|
|
|
I also install a special script in the file ~/GNUstep/GNUstep.sh with the
|
2001-07-26 18:34:42 +00:00
|
|
|
lines:
|
|
|
|
|
|
|
|
if [ $GNUSTEP_HOST_OS = "mingw32" ]; then
|
|
|
|
GNUSTEP_SYSTEM_ROOT=`cygpath -w $GNUSTEP_SYSTEM_ROOT | tr '\\\' '/'`
|
|
|
|
fi
|
|
|
|
|
|
|
|
So both Cygwin's shell and MinGW tools can understand the GNUstep directories
|
|
|
|
(You can add similar lines for GNUSTEP_LOCAL_ROOT, GNUSTEP_USER_ROOT, etc.)
|
|
|
|
This automatically gets executed by the above command.
|
|
|
|
|
2001-02-28 19:59:16 +00:00
|
|
|
6. Now you can compile the Objective-C runtime DLL (unless you already
|
2001-07-26 18:34:42 +00:00
|
|
|
have one installed):
|
2001-02-28 19:59:16 +00:00
|
|
|
|
2001-04-10 03:19:42 +00:00
|
|
|
cd gnustep-objc
|
|
|
|
/usr/bin/make target=i386-mingw32 shared=yes
|
|
|
|
/usr/bin/make target=i386-mingw32 shared=yes install
|
2001-02-28 19:59:16 +00:00
|
|
|
|
2001-07-26 18:34:42 +00:00
|
|
|
Make sure to remove libobjc.a that comes with gcc, otherwise it will find that
|
|
|
|
one instead of the one we want.
|
|
|
|
|
2001-04-10 03:19:42 +00:00
|
|
|
7. Now we can configure and build the gnustep-base library.
|
2001-02-28 19:59:16 +00:00
|
|
|
|
2001-04-10 03:19:42 +00:00
|
|
|
cd gnustep-base
|
2001-03-02 15:37:20 +00:00
|
|
|
./configure --target=i386-mingw32
|
2001-04-10 03:19:42 +00:00
|
|
|
/usr/bin/make target=i386-mingw32 shared=yes
|
|
|
|
/usr/bin/make target=i386-mingw32 shared=yes install
|
2001-02-28 19:59:16 +00:00
|
|
|
|
|
|
|
If you get tired of typing "target=i386-mingw32" all the time, then before
|
|
|
|
you exec the GNUstep.sh script, just set the GNUSTEP_HOST:
|
|
|
|
|
|
|
|
export GNUSTEP_HOST=i586-pc-mingw32
|
|
|
|
. $GNUSTEP_SYSTEM_ROOT/Makefiles/GNUstep.sh
|
|
|
|
|
|
|
|
|
|
|
|
Native MinGW
|
|
|
|
------------
|
|
|
|
|
|
|
|
(Information provided by Craig Miskell)
|
|
|
|
|
|
|
|
So far, this configuration only works when compiling the Makefile package
|
2001-03-02 15:37:20 +00:00
|
|
|
(gnustep-make). It should, in the future work on the libraries. First, you
|
2001-02-28 19:59:16 +00:00
|
|
|
need to get a port of sh (probably zsh) for Windows
|
|
|
|
(ftp://ftp.blarg.net/users/amol/).
|
|
|
|
|
|
|
|
1. Make sure $HOST_CC or $CC is set to MinGW's gcc. The default seems to be
|
|
|
|
wrong.
|
|
|
|
|
|
|
|
2. Now configure. You may need to set the installation directory, because
|
|
|
|
the default installation dir is for Unix machines:
|
|
|
|
|
|
|
|
./configure --prefix=/usr/GNUstep/System
|
|
|
|
|
|
|
|
(Make sure the drive is specified correctly in the path).
|
|
|
|
|
|
|
|
3. Then make and install
|
|
|
|
|
|
|
|
make
|
|
|
|
make install
|
|
|
|
|
|
|
|
4. Now source the GNUstep.sh file so the rest of the packages will
|
|
|
|
compile correctly:
|
|
|
|
|
|
|
|
. $GNUSTEP_SYSTEM_ROOT/Makefiles/GNUstep.sh
|
|
|
|
|
2001-10-09 14:51:37 +00:00
|
|
|
|
|
|
|
Problems?
|
|
|
|
---------
|
|
|
|
|
|
|
|
Compiling ffcall:
|
|
|
|
|
|
|
|
./configure --host=i386-mingw32 --prefix=//c/mingw
|
|
|
|
|
|
|
|
Problems compiling ffcall with MingWs gcc? Use Cygwin gcc:
|
|
|
|
|
|
|
|
export CC="gcc -mno-cygwin"
|
|
|
|
|
|
|
|
Configure problem finding ld with MingW?
|
|
|
|
|
|
|
|
LD=ld ./configure
|
|
|
|
|
|
|
|
Good Sites for Pre-Compiled Binaries
|
|
|
|
------------------------------------
|
|
|
|
|
|
|
|
Many libraries, etc from:
|
|
|
|
|
|
|
|
<http://sourceforge.net/project/showfiles.php?group_id=7382>
|
|
|
|
|
|
|
|
MingW guile from
|
|
|
|
|
|
|
|
<http://www.textsure.net/~ela/devel.html>.
|
|
|
|
|
|
|
|
also need guile from
|
|
|
|
|
|
|
|
<http://sourceforge.net/project/showfiles.php?group_id=7382>
|
|
|
|
|
|
|
|
for guile-config file.
|
|
|
|
|
|
|
|
Author
|
|
|
|
------
|
|
|
|
|
|
|
|
Adam Fedor <fedor@gnu.org>
|