Re: [Java-gnome-developer] How to compile native with gcj
Brought to you by:
afcowie
From: Bruno D. <bdu...@be...> - 2005-03-18 12:35:27
|
On jeu, 2005-03-17 at 21:55 +0100, Luca Merolla wrote: > Hi, > I'm trying to compile a sample program natively with gcj but I got this > annoying message: > > make native > gcj > -classpath /usr/share/libgtk-java-2.6/lib/gtk2.6.jar:/usr/share/java-gnome/lib/glade2.8.jar -lgtkjar2.6 -lgnomejar2.8 --main=com.osnetwork.Main -o bin/jquote src/com/osnetwork/Main.java > /usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lgtkjar2.6 > collect2: ld returned 1 exit status > make: *** [native] Error 1 > > I have used the Makefile from java-gnome website made by NickG, I just > changed this variables: > > INCLUDES=/usr/share/libgtk-java-2.6/lib/gtk2.6.jar:/usr/share/java-gnome/lib/glade2.8.jar > LIBS=-lgtkjar2.6 -lgladejar2.8 > LIBPATH=/usr/lib > FILES=src/com/osnetwork/Main.java > MAIN=com.osnetwork.Main > TARGET=bin/jquote > > How can I solve this? > Thanks in advance > Where are your .so located ? I think you should add the -L flags, tellings gcj where to find your .so files, in order for the linker (ld in this case) to link the program to them. Like this (if .so files are in /usr/lib) : gcj [...] -lgtkjar2.6 -L/usr/lib [...]. Don't know if it's clear or not :). I may be wrong, but the error raised by ld is telling me it's the solution. -- Bruno Dusausoy <bdu...@be...> |