1 libFoundation on Windows mingw32 README
2 =======================================
7 I have started to port the libFoundation library to Windows 95/NT by
8 using the so called mingw32 environment. Mingw32 is a GNU compilation
9 environment containing gcc, ld and other tools.
10 The port is done in a cross-compilation environment. This is significant
11 mostly because configure and the Makefiles might not work on Win32 because
12 of file naming problems (slash vs backslash).
13 First attempts are made to compile lF using mingw32 only, that is, without
14 cross-compilation and without cygwin, see below for issues.
19 The libFoundation compiles with a sparc-solaris-X-i386-mingw32 compiler in
20 the GNUstep make environment. Quite a lot information regarding Unix
21 to Windows porting using GNU tools is contained on this site:
23 http://www.xraylith.wisc.edu/~khan/software/gnu-win32/
25 The site includes a HOWTO file for creating a cross-compiler with a
26 i386-mingw32 target which I found *very* useful.
28 I recently modified libFoundation to use the Win32 API libraries at
30 http://www.acc.umu.se/~anorland/gnu-win32/w32api.html
32 These includes/libraries are much more extensive than the ones delivered
33 with mingw32. Probably they will make it into the mingw32 distribution.
35 There are some other Unix-to-Windows porting packages, especially Cygwin
36 from http://www.cygnus.com. Cygwin emulates large parts of Unix
37 in it's environment and also provides a Unix shell environment that
38 might be used to host native mingw32 compiles.
39 The major advantages of mingw32 is that the resulting executables are
40 not covered by GPL and that it doesn't require any additional libraries but
41 the ones provided by Windows itself. The disadvantage is that more porting
47 If compiling lF with gstep-make (--with-gnustep configure switch) you
48 have to configure gstep-make for cross-compilation. This is usually
49 done with a sequence like this:
52 setenv CC i386-mingw32-gcc
53 setenv RANLIB i386-mingw32-ranlib
54 setenv AR i386-mingw32-ar
55 setenv DLLTOOL i386-mingw32-dlltool
57 ./configure --prefix=/usr/local/GNUstep \
58 --target="i386-mingw32" \
60 unsetenv CC RANLIB AR DLLTOOL
63 Never forget to remove config.cache before calling configure on a different
65 If you have done this you can use just
67 make target="i386-mingw32"
69 to cross compile a gstep-make package.
74 If you have correctly installed your mingw32 x-tools and gstep-make package,
75 compilation of libFoundation for Windows is quite easy:
78 setenv CC i386-mingw32-gcc
80 ./configure --with-gnustep --target="i386-mingw32"
82 make target="i386-mingw32" install
84 That's it ! The resulting binaries will be placed in the appropriate
85 platform subdirectories of the GNUstep hierachy, this way you can keep
86 libraries for multiple targets in one hierachy.
88 Native Build of lF with cygwin tools
89 ====================================
91 I managed to compile lF on NT using the cygwin environment (this is
92 actually a x-compilation as well, from cygwin->mingw32). Note that the
93 cygwin environment is only used as the compilation environment, the
94 resulting binary is still mingw32-only.
96 To get this running I got the b20 version of cygwin:
98 http://sourceware.cygnus.com
100 The gcc 2.95.2 compilers from Mumit Khan:
102 ftp://www.xraylith.wisc.edu/pub/khan/gnu-win32/mingw32/
104 The GNUstep-make package:
106 ftp://ftp.gnustep.org/pub/gnustep
108 First you need to configure gstep-make:
111 ./configure --target=i386-mingw32 \
112 --prefix=/cygwin/GNUstep \
113 --program-suffix=.exe \
114 --with-library-combo=gnu-fd-gnu-nil
115 make target=i386-mingw32 install
117 Note the --target switch. If you miss that, gstep-make will be configured
118 for producing cygwin binaries, which is a different story - so don't
119 forget it ! (See below for a hack avoiding this x-setup).
120 If you get a message from native make like 'unmatched "', you probably
121 are using a wrong shell. Check whether the SHELL variable and /bin/sh
122 matches your standard shell (eg cygwin bash or zsh)
123 If you get makefiles errors, you may want to make sure that you are
124 running cygwin in unix-make-mode (eg echo $MAKE_MODE)
126 If you like you can patch config.guess to output 'i386-pc-mingw32', this
127 makes running tools a bit nicer (this way you avoid making config.guess
128 guess the environment as being cygwin). To do that, replace config.guess
132 echo "i386-pc-mingw32"
134 After you have installed GNUstep makefiles, source them (you might also
135 want to source them on every startup in the .profile file).
137 Native Build of lF with mingw32 tools
138 =====================================
140 It will also be possible to compile libFoundation without the help of a
141 Unix system or a Unix emulation like cygwin. The native build process needs
142 some more stuff than just the mingw32 binaries provided by Mumit Khan.
146 egcs and make binaries as provided by Mumit Khan:
148 ftp://www.xraylith.wisc.edu/pub/khan/gnu-win32/mingw32/
150 an appropriate sh.exe, eg the zsh:
152 ftp://ftp.blarg.net/users/amol/
154 (note that the native bash I retrieved didn't work with make)
158 ftp://agnes.dida.physik.uni-essen.de/home/janjaap/mingw32/newnew/
160 some other tools are useful but not required if one does some handwork:
162 mkdir (the DOS mkdir is an internal command and not available in zsh)
165 I figured out that you need at least these to run configure:
173 http://agnes.dida.physik.uni-essen.de/~janjaap/mingw32/download.html
177 The Unix95 kit provides some Unix utilities described (it's also called
180 http://www.itribe.net/virtunix/files/unix95.7.zip
182 Note that the library doesn't yet build cleanly, I work on this.
184 Other useful native Windows software
185 ====================================
189 ftp://ftp.ese-metz.fr/pub/xemacs/win32/
193 ftp://ftp.blarg.net/users/amol/tcsh/
195 Further Mingw32 software:
197 ftp://agnes.dida.physik.uni-essen.de/home/janjaap/mingw32
198 ftp://www.xraylith.wisc.edu/pub/khan
199 ftp://ftp.franken.de/pub/win32/develop/gnuwin32/mingw32
202 Helge Hess (hh@mdlink.de)
203 MDlink online service center
207 ! mode: indented-text