This is the mail archive of the
java-discuss@sources.redhat.com
mailing list for the Java project.
Re: generating shared libs
- To: "Immanuel, Gidado-Yisa" <avm3 at cdc dot gov>
- Subject: Re: generating shared libs
- From: Tom Tromey <tromey at redhat dot com>
- Date: 23 Dec 2000 00:23:19 -0700
- Cc: "'java-discuss at sources dot redhat dot com'" <java-discuss at sources dot redhat dot com>
- References: <B7F9A3E3FDDDD11185510000F8BDBBF20363B673@mcdc-atl-5.cdc.gov>
- Reply-To: tromey at redhat dot com
>>>>> ">" == Immanuel, Gidado-Yisa <avm3@cdc.gov> writes:
>> 1. How do I combine several object files (created from .javaJ) to
>> make my own shared lib (.so)?
The same way you make any .so on your platform.
For instance on Linux I believe you can compile each object file with
`-fPIC' and then link them into a shared object using `gcc -shared'.
>> 2. Also, is there a convenient way to do [1] but starting from a
>> jar file?
I think you can compile jar files directly. However, I've never done
it (and to me it seems a bit amazing :-). Maybe something like this
would work?
gcc -fPIC -shared -o libmystuff.so mystuff.jar
Tom