public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Problem with JNI, Creating Native code for JAVA
@ 1997-10-22  6:12 Tomas Olsson
  1997-10-26 13:30 ` Andrew Pollard
  0 siblings, 1 reply; 2+ messages in thread
From: Tomas Olsson @ 1997-10-22  6:12 UTC (permalink / raw)
  To: gnu-win32

Hi,
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.

/Tomas Olsson

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Problem with JNI, Creating Native code for JAVA
  1997-10-22  6:12 Problem with JNI, Creating Native code for JAVA Tomas Olsson
@ 1997-10-26 13:30 ` Andrew Pollard
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Pollard @ 1997-10-26 13:30 UTC (permalink / raw)
  To: tomas.olsson; +Cc: gnu-win32

>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@odie.demon.co.uk
 2 Milbanke Court, Milbanke Way, Bracknell  | work: andrewp@autosim.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@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1997-10-26 13:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-10-22  6:12 Problem with JNI, Creating Native code for JAVA Tomas Olsson
1997-10-26 13:30 ` Andrew Pollard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).