[Java-gnome-developer] Plase help - cant compile with gcj at all....
Brought to you by:
afcowie
From: Clemens E. <Lin...@we...> - 2002-05-15 20:23:28
|
Hello again ;-(( > This has been reported in the past but I have never been > able to pinpoint the cause. Usually if the developer > types make again it will compile correctly. Let me know > if you are still having problems. > I'm so sorry that I waste your important time ;-( I'm very new in java, and this technic I never tried (jni and so).. OK, the test-examples does compile while make, eg there are in .../test already .class-files. But when I type java TestGTK then only comes: java.lang.NoClassDeFoundError: gnu.gtk I know that there is a gtk.jar in ../lib, and I can compile that with gcj -c gtk.jar. Than I have an object file with 20meg-size ;-(( And when I do this and lik gtk.o to TestGTK: "gcj -fPIC -fjni -g -O -o test --main=TestGTK TestGTK.java gtk.o" then only that comes: >No class or interface gnu.gtk found. >TestGTK.java:1694: Type `GtkHSeparator' not found in the > declaration of the local variable `separator'. > GtkHSeparator separator = new GtkHSeparator(); > ^ > TestGTK.java:1697: Type `GtkVBox' not found in the > declaration of the local variable `box3'. > GtkVBox box3 = new GtkVBox(false, 10); and so on, and so on.... I think I dont understand the system: Where are the needed java-packages, or how can I say gcj and java how to use them? I tried to unpack libgcj.jar and I added all files in ../gnu (only the class-files) and packed all into a zip-file libgcj.jar again. But the only this appeard: [clemi@localhost glade]$ gcj LibGladeTest.java --main=LibGladeTest -o test[K /tmp/ccOwY7Ll.o: In function `LibGladeTest::LibGladeTest(java::lang::String*)': /home/clemi/java-gtk-0.7.1/src/examples/glade/LibGladeTest.java(.text+0x1b): undefined reference to `gnu::glade::LibGlade::class$' /home/clemi/java-gtk-0.7.1/src/examples/glade/LibGladeTest.java(.text+0x33): undefined reference to `gnu::glade::LibGlade::LibGlade(java::lang::Object*, java::lang::String*, java::lang::String*)' /home/clemi/java-gtk-0.7.1/src/examples/glade/LibGladeTest.java(.text+0x5d): undefined reference to `gnu::gtk::GtkDialog::class$' /home/clemi/java-gtk-0.7.1/src/examples/glade/LibGladeTest.java(.text+0x90): undefined reference to `gnu::gtk::GtkFileSelection::class$' /home/clemi/java-gtk-0.7.1/src/examples/glade/LibGladeTest.java(.text+0xc3): undefined reference to `gnu::gtk::GtkColorSelectionDialog::class$' /home/clemi/java-gtk-0.7.1/src/examples/glade/LibGladeTest.java(.text+0xf6): undefined reference to `gnu::gtk::GtkFontSelectionDialog::class$' /home/clemi/java-gtk-0.7.1/src/examples/glade/LibGladeTest.java(.text+0x129): undefined reference to `gnu::gtk::GtkInputDialog::class$' /tmp/ccOwY7Ll.o: In function `LibGladeTest::gtkMainQuit()': /home/clemi/java-gtk-0.7.1/src/examples/glade/LibGladeTest.java(.text+0x157): undefined reference to `gnu::gtk::Gtk::mainQuit()' /tmp/ccOwY7Ll.o: In function `LibGladeTest::gtkWidgetDestroy()': /home/clemi/java-gtk-0.7.1/src/examples/glade/LibGladeTest.java(.text+0x167): undefined reference to `gnu::gtk::Gtk::mainQuit()' /tmp/ccOwY7Ll.o: In function `LibGladeTest::main(JArray<java::lang::String*>*)': /home/clemi/java-gtk-0.7.1/src/examples/glade/LibGladeTest.java(.text+0x342): undefined reference to `gnu::gtk::Gtk::init(int, JArray<java::lang::String*>*)' /home/clemi/java-gtk-0.7.1/src/examples/glade/LibGladeTest.java(.text+0x395): undefined reference to `gnu::gtk::Gtk::main()' /tmp/ccOwY7Ll.o: In function `LibGladeTest::LibGladeTest(java::lang::String*)': /home/clemi/java-gtk-0.7.1/src/examples/glade/LibGladeTest.java(.data+0x4): undefined reference to `gnu::gtk::GtkDialog::class$' /home/clemi/java-gtk-0.7.1/src/examples/glade/LibGladeTest.java(.data+0x14): undefined reference to `gnu::gtk::GtkFileSelection::class$' /home/clemi/java-gtk-0.7.1/src/examples/glade/LibGladeTest.java(.data+0x24): undefined reference to `gnu::gtk::GtkColorSelectionDialog::class$' /home/clemi/java-gtk-0.7.1/src/examples/glade/LibGladeTest.java(.data+0x34): undefined reference to `gnu::gtk::GtkFontSelectionDialog::class$' /home/clemi/java-gtk-0.7.1/src/examples/glade/LibGladeTest.java(.data+0x44): undefined reference to `gnu::gtk::GtkInputDialog::class$' collect2: ld returned 1 exit status I really dont understand whats wrong, please help me. ]0;clemi@localhost.localdomain: /home/clemi/java-gtk-0.7.1/src/examples/glade[clemi@localhost glade]$ [ I also tried this with the compiled .o-files, but it has no affect. I hope you arent now not angry ;-) Mfg Clemens > > > Hello! > > > > Im so sorry to waste your time. I tried really everything, > > but now I'm > > at the end! > > > > OK: > > 1. ./configure --with-gcj-prefix=/usr/share/gcc-3.0.4/ > > --with-gtl-only > > You do mean --with-gtk-only? > > > > +ENTER > > 2. make + ENTER > > 3. make install +ENTER > > > > But when I tried to compile with gcj or to run compiled > > class-files with > > java, this happens: > > > > gcj -fPIC -fjni -g -O -o TestGTK --main=TestGTK TestGTK.java > > -lGTKJar -L /home/clemi/Java/downloads/java-gtk-0.7.1/lib/gtk.jar > > > > It looks like it cant find anything..: > > > > TestGTK.java:1694: Type `GtkHSeparator' not found in the > > declaration of the local variable `separator'. > > GtkHSeparator separator = new GtkHSeparator(); > > ^ > > TestGTK.java:1697: Type `GtkVBox' not found in the > > declaration of the local variable `box3'. > > GtkVBox box3 = new GtkVBox(false, 10); > > ^ > > TestGTK.java:1701: Type `GtkButton' not found in the > > declaration of the local variable `button' > > GtkButton button = new GtkButton("close"); > |