This is the mail archive of the
java-discuss@sources.redhat.com
mailing list for the Java project.
Re: Status of gij with shared libraries?
- To: Barnet Wagman <wagman at enteract dot com>
- Subject: Re: Status of gij with shared libraries?
- From: Bryce McKinlay <bryce at albatross dot co dot nz>
- Date: Wed, 24 Jan 2001 23:40:15 +1300
- CC: "java-discuss at sources dot redhat dot com" <java-discuss at sources dot redhat dot com>
- References: <3A6E7FB7.4B189B7B@enteract.com>
Barnet Wagman wrote:
> I've gotten gij to work with a shared library by following
> instructions posted to the list back in April 2000. These state that
> the shared library must be created with gcj -shared Foo.so Foo.class
> and that you cannot use libraries created with ld on the binaries
> produced by gcj -c (which I learned the hard way myself).
Yeah, well when you do that you're not creating a shared library, just
an object file!
> Are these instructions still correct? They are the only instructions
> for using gij with shared libraries that I've managed to find.
That sounds about right. You can of course create shared libraries with
ld, as long as you give it the right options to tell it to make a shared
library. Its easier to do it with "gcj --shared". Note that you can also
do something like "gcj --shared *.o -o my-package.so".
> Where do you find this file? I just updated the libjava/NEWS in tbe
> CVS tree and got a file from last February, which doesn't have any
> details.
Read the bit about Class.forName(). gij is essentially just a front end
to the "Class.forName()" call. We'll try to document this better in the
gcj manual, hopefully before the release.
regards
[ bryce ]