This is the mail archive of the
mailing list for the Java project.
Re: how to reference a lib*.so instead of using -I blat.jar
- From: Andrew Haley <aph at redhat dot com>
- To: Heitzso <heitzso at growthmodels dot com>
- Cc: java at gcc dot gnu dot org
- Date: Wed, 15 Feb 2006 13:54:19 +0000
- Subject: Re: how to reference a lib*.so instead of using -I blat.jar
- References: <43F3302B.firstname.lastname@example.org>
> Quick question ....
> I have a jar, A, that is dependent on another jar, B.
> Let's say I use gcj to compile B.jar down to a libB.so file.
> Now, when I go to compile A down to libA.so, I'm currently
> setting up the gcj command like:
> gcj -I B.jar -c -o libA.so A.jar
> What should I be doing instead to pick up the B.jar classes
> from libB.so instead of from "-I B.jar"
Fomr "man ld" :
Add archive file archive to the list of files to link. This option
may be used any number of times. ld will search its path-list for
occurrences of "libarchive.a" for every archive specified.
On systems which support shared libraries, ld may also search for
libraries with extensions other than ".a". Specifically, on ELF and
SunOS systems, ld will search a directory for a library with an exten-
sion of ".so" before searching for one with an extension of ".a". By
convention, a ".so" extension indicates a shared library.