[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Compiling GNUstep on Windows
From: |
Roland Schwingel |
Subject: |
Compiling GNUstep on Windows |
Date: |
Wed, 18 Sep 2002 16:46:32 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826 |
Hi...
A few days ago I sucessfully compiled GNUstep 1.5.0 as DLL for windows
(mingw32).
I studied the README files in the gnustep-make package for mingw and
cygwin building but none
of them did work for me (but where _very_ valueable).
So I sat down and did take a deep look inside the process. Here is my
small, but complete walkthru
for the job. Maybe this is also helpful to other people... The walkthru
is for gnustep-base 1.5.0, but
I am sure it will work with older versions as well.
Whats my environment:
Actual cygwin (1.3.12) with mingw runtime (2.1) so I have to compile
with gcc -mno-cygwin to
get a mingw dll. (I am *NOT* using the mingw/msys distribution! - I
tried it as described in
the readme, but with *NO* success)
You need just cygwin and the appropriate cygwin packages
(gcc,binutils,w32api, make,...).
I used gcc2 (with hooked in objc support of course) not gcc3! I run
everything under Win2000.
So here are the steps (after opening a bash)
======================================================================
gnustep-make-1.5.0:
./configure --target=i386-mingw32 --enable-flattened
--without-system-root --with-local-root=/usr/GNUstep
--with-network-root=/usr/GNUstep
make target=i386-mingw32
make target=i386-mingw32 install
. /usr/GNUstep/Makefiles/GNUStep.sh
ffcall-1.8d:
./configure --target=i386-mingw32
--prefix=`$GNUSTEP_MAKEFILES/fixpath.sh -u $GNUSTEP_SYSTEM_ROOT`
make LN_S=cp
make install
iconv-1.8:
(the part with the most problems - maybe you download it precompiled but
if you want to compile it - here is the guide)
Make sure you are compiling from a mapped drive (eg. d:) not from an UNC
Path!!!!
./configure --target=i386-mingw32 --host=i386-mingw32
(ignore warnings here)
edit libtool and libcharset/libtool so that the CC variable reads "gcc
-mno-cygwin -mdll"
make
(After a while make breaks with an error in linking)
find . -name "*.lnk" -print -exec rm {} \;
make
(make breaks now in the src folder, but the DLL is already buildt, that
is what we need)
cp include/iconv.h $GNUSTEP_SYSTEM_ROOT/Headers
cp lib/.libs/libiconv-2.dll $GNUSTEP_SYSTEM_ROOT/Tools/libiconv-2.dll
cp lib/.libs/libiconv.dll.a $GNUSTEP_SYSTEM_ROOT/Libraries/libiconv.a
gnustep-objc-1.2.2:
As of the fact I need a special function there exported I had to add
objc_set_error_handler in libobjc.def
make clean
find . -name "*.lnk" -print -exec rm {} \;
make target=i386-mingw32 shared=yes LN_S="ln -s"
SHARED_LD_PREFLAGS="--driver-flags=\"-mno-cygwin -mdll
-Wl,--enable-stdcall-fixup\" --target=i386-mingw32 --export-all-symbols"
make target=i386-mingw32 shared=yes LN_S="ln -s"
SHARED_LD_PREFLAGS="--driver-flags=\"-mno-cygwin -mdll
-Wl,--enable-stdcall-fixup\" --target=i386-mingw32 --export-all-symbols"
install
gnustep-base-1.5.0:
./configure --target=i386-mingw32
(Ignore error in libxml test when you don't have libxml installed, also
SSL warnings!)
make clean
make clean debug=yes
find . -name "*.lnk" -print -exec rm {} \;
make target=i386-mingw32 shared=yes LN_S="ln -s"
SHARED_LD_PREFLAGS="--driver-flags=\"-mno-cygwin -mdll
-Wl,--enable-stdcall-fixup\" --target=i386-mingw32 --export-all-symbols"
SYSTEM_LDFLAGS="-mno-cygwin"
make target=i386-mingw32 shared=yes LN_S="ln -s"
SHARED_LD_PREFLAGS="--driver-flags=\"-mno-cygwin -mdll
-Wl,--enable-stdcall-fixup\" --target=i386-mingw32 --export-all-symbols"
SYSTEM_LDFLAGS="-mno-cygwin" install
cd Source
find . -name "*.lnk" -print -exec rm {} \;
make target=i386-mingw32 shared=yes debug=yes LN_S="ln -s"
SHARED_LD_PREFLAGS="--driver-flags=\"-mno-cygwin -mdll
-Wl,--enable-stdcall-fixup\" --target=i386-mingw32 --export-all-symbols"
SYSTEM_LDFLAGS="-mno-cygwin"
make target=i386-mingw32 shared=yes debug=yes LN_S="ln -s"
SHARED_LD_PREFLAGS="--driver-flags=\"-mno-cygwin -mdll
-Wl,--enable-stdcall-fixup\" --target=i386-mingw32 --export-all-symbols"
SYSTEM_LDFLAGS="-mno-cygwin" install
cd ..
======================================================================
Thats all... :-)
Now you have everything under /usr/GNUstep
Roland
- Compiling GNUstep on Windows,
Roland Schwingel <=