This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Cant compile java-gnome sample, it alsways says "undefined reference"
- From: Clemens Eisserer <Linuxhippy at web dot de>
- To: java at gcc dot gnu dot org
- Date: Fri, 21 Jan 2000 20:44:55 +0100
- Subject: Cant compile java-gnome sample, it alsways says "undefined reference"
Hello!
I tried to work with java-gnome (jni-bindings for gtk) and gcj (on the
java-gnome homepage they said that this combination shouldwork).
The compilation of this bindings made an "gtk.jar" and an
"libgtk.so.0.71". The lingtk.so.071 is copied by "make install"into
"/usr/lib" and the gtk.jar is in "/usr/local/share/java-gtk/gtk.jar".
When I want to compile now an test-sample with "gcj -fPIC -fjni -lGTKJAR
(or even -lGTKJar) TestGTK.java -o testgtk -O -g
--classpath=/usr/Share/gcc-3.0.4/libgcj.jar:/usr/local/share/java-gtk/gtk.jar",
always this happens "usr/bin/ld cant find -lGTKJAR".
If I leave that -lGTKJAR away it alway throws "abc.java(.data+xyz):
undefined reference to `gnu::ABC::XYZ`" and "collect2: ld returned 1
exit status".
BUT: gcj -c TestGTK.java works very fine.
I've also tried to make an library-file, and I did so. I compiled all
java-files with "gcj -c Filename.java" and liked that with"objects=`find
. -name '*.o'` gcj -shared $objects -o gnu.so" Then I got an gnu.so, but
I dont know what to do with that?
Please help, I tried really everything I know. I asked the
java-gnome-developers about 10 times but nobody knows what this should be.
Thx Clemena