This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: GCJ and dynamic linking
- To: Dachuan Yu <dachuan dot yu at yale dot edu>
- Subject: Re: GCJ and dynamic linking
- From: Jeff Sturm <jsturm at one-point dot com>
- Date: Mon, 17 Sep 2001 21:16:29 -0400 (EDT)
- cc: java at gcc dot gnu dot org
On Mon, 17 Sep 2001, Dachuan Yu wrote:
> Does GCJ support dynamic linking?
On targets that support shared libraries, such as GNU/Linux, yes.
Use the `-shared' flag to create a shared library (just as you would for
the C/C++ compiler), e.g.
gcj -shared -fPIC Example.java -o Example.so
gcj Main.java Example.so --main=Main
Jeff