This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]