From: andrew AT odie DOT demon DOT co DOT uk (Andrew Pollard) Subject: Re: Problem with JNI, Creating Native code for JAVA 26 Oct 1997 13:55:28 -0800 Message-ID: <199710261741.RAA26257.cygnus.gnu-win32@odie.demon.co.uk> References: <344DFB93 DOT 4A8891FD AT ellemtel DOT se> To: tomas DOT olsson AT ellemtel DOT se Cc: gnu-win32 AT cygnus DOT com >I have seen a lot of questions about creating native code for JAVA with >gcc and there are a lot of problems and it does not seem to be anyone >who can answer them. Has anybody had success in doing so. I haven't done it under gnuwin32, but I have done it under Solaris2 and Linux... You need to get a libgcc.a that is compiled with the -fPIC/-fpic flag to allow linking in with a shared object (libgcc.a contains a lot of support routines for gcc...) I just did it by editing the gcc makefile (added -fPIC to CCLIBFLAGS and LIBGCC2_CFLAGS). You can then either make a libgcc.so (I assume libgcc.dll for gnuwin32), or link the dynamically loaded routines with this new libgcc.a). I don't know how applicable it is to the gnuwin32 and .dlls, but I suspect it is a similar problem. Hope this helps, Andrew. -- Andrew Pollard, Auto Simulations Ltd. UK. | home: andrew AT odie DOT demon DOT co DOT uk 2 Milbanke Court, Milbanke Way, Bracknell | work: andrewp AT autosim DOT com Tel:+44(0)1344 426486 Fax:+44(0)1344 426615 | http://www.odie.demon.co.uk - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".