This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
compiling with shared libraries
I'm still confused about to build a working executable
using a -findirect-dispatch library:
Directly from .o files:
$ gcj -Wl,-Bsymbolic -g -O2 -o kawa-bin --main=kawa.repl ./.libs/*.o
$ ./kawa-bin
((works))
First building a shared library:
$ gcj -shared -Wl,-Bsymbolic -o kawa.so ./.libs/*.o
$ gcj -Wl,-Bsymbolic -o kawa-bin --main=kawa.repl kawa.so
$ LD_LIBRARY_PATH=. ./kawa-bin
Exception during runtime initialization
java.lang.NullPointerException
<<No stacktrace available>>
The .o files were compiled (by libtool) using
-g -O -findirect-dispatch -fPIC
--
--Per Bothner
per@bothner.com http://per.bothner.com/