Thread: [Java-gnome-developer] Compiling the examples codes
Brought to you by:
afcowie
From: Khiraly <khi...@gm...> - 2005-01-10 22:05:21
|
Hi! I have downloaded the latest source code: ftp://ftp.gnome.org/pub/GNOME/sources/libgnome-java/2.9/libgnome-java-2.9.3.tar.bz2 In the doc/examples directory I wanted to compile the: simplemenu application. (the runExample.sh does not seem to work for me, I dont know pkg-config) I used the following command to compile(native binary): gcj-3.4 -classpath /usr/share/java/gtk2.4.jar:/usr/share/java/gnome2.8.jar -lgtkjar2.4 -lgnomejar2.8 --main=SimpleMenu SimpleMenu.java /usr/bin/ld: cannot find -lgtkjar2.4 collect2: ld returned 1 exit status However on my system (debian SID), I have installed the following packages: java-common libgnome0-java libgnome2-java libgtk2-java gcj-3.4 libgcj5 libgcj5-awt libgcj5-common libgcj5-dev I have the /usr/share/java/gtk2.4.jar file. I have added the '/usr/share/java/' directory to my /etc/ld.so.conf file, and executed ldconfig as root. (ldconfig -v does not show libjava or libgtk-java). Question: How can I set correctly my /usr/bin/ld file? Best regards, Khiraly |
From: Andrew C. <an...@op...> - 2005-01-10 22:35:14
|
Be aware that you're mixing development and released stable versions of the code. On Mon, 2005-10-01 at 23:05 +0100, Khiraly wrote: > I have downloaded the latest source code: > ftp://ftp.gnome.org/pub/GNOME/sources/libgnome-java/2.9/libgnome-java-2.9.3.tar.bz2 That's the development branch > I used the following command to compile(native binary): > > gcj-3.4 > -classpath /usr/share/java/gtk2.4.jar:/usr/share/java/gnome2.8.jar > -lgtkjar2.4 -lgnomejar2.8 --main=SimpleMenu SimpleMenu.java > /usr/bin/ld: cannot find -lgtkjar2.4 > collect2: ld returned 1 exit status Whereas all those refer to libraries from the stable released version (which is correct & what you should be testing against). ++ Have you had success using a normal Java VM first? GCJ can be a bit tricky. Establish that you can compile with javac (ie, have your CLASSPATH right) and then run using java (ie, have your LD_LIBRARY_PATH right) a test program, then cycle back and try GCJ again. To test, you might try entries.Entry - I find that a nice simple example to start with. [Oh, to that gcj command line, you might want to add a -o flag to say where the output executable is going to go. That's nothing to do with the problem you're having, though] ++ I've heard some Debian people mention their libraries were in /usr/lib/jni for some absurd reason. You might need that on your library path. AfC Sydney -- Andrew Frederick Cowie OPERATIONAL DYNAMICS Operations Consultants and Infrastructure Engineers http://www.operationaldynamics.com/ Sydney: +61 2 9977 6866 New York: +1 646 472 5054 Toronto: +1 416 848 6072 London: +44 207 1019201 |
From: Khiraly <khi...@gm...> - 2005-01-11 01:37:59
|
2005-01-11, k keltez=E9ssel 09:35-kor Andrew Cowie ezt =EDrta: > > I have downloaded the latest source code: > > ftp://ftp.gnome.org/pub/GNOME/sources/libgnome-java/2.9/libgnome-java= -2.9.3.tar.bz2 >=20 > That's the development branch I have downloaded this source code only because I didnt find the examples file shipped with debian packages. So I want to use the stable libgnome* package. I picked this source only to have the example code. > Have you had success using a normal Java VM first? No, but I will try it. Thx for the tip. > To test, you might try entries.Entry - I find that a nice simple exampl= e > to start with. >=20 Do you mean doc/examples/entry/EntryTest.java ? > I've heard some Debian people mention their libraries were > in /usr/lib/jni for some absurd reason. You might need that on your > library path. I had added to my ld.so.conf file (and executed ldconfig) but didnt change anything. I will try with the regular javac. >=20 > AfC > Sydney Best regards,=20 Khiraly |
From: Jeff M. <ku...@gm...> - 2005-01-11 02:04:59
|
On Tue, 11 Jan 2005 02:36:52 +0100, Khiraly <khi...@gm...> wrote: > 2005-01-11, k keltez=E9ssel 09:35-kor Andrew Cowie ezt =EDrta: > > > I have downloaded the latest source code: > > > ftp://ftp.gnome.org/pub/GNOME/sources/libgnome-java/2.9/libgnome-java= -2.9.3.tar.bz2 > > > > That's the development branch > I have downloaded this source code only because I didnt find the > examples file shipped with debian packages. > So I want to use the stable libgnome* package. I picked this source only > to have the example code. If you want to use the latest source I just created a new release 2.9.4 that has numerous enhancements and bug fixes.=20 >=20 > > Have you had success using a normal Java VM first? > No, but I will try it. Thx for the tip. >=20 > > To test, you might try entries.Entry - I find that a nice simple exampl= e > > to start with. > >=20 > Do you mean doc/examples/entry/EntryTest.java ? I would suggest looking at the examples taht come with libgtk-java first. Many of the libgnome-java classes have been deprected and replaced with similar widgets in libgtk-java. This is due to the same changes in libgnomeui and gtk+. FYI, there is a bug in UIInfo that I only discovered Sunday night. I didn't have time to fix this bug prior to today's release. >=20 > > I've heard some Debian people mention their libraries were > > in /usr/lib/jni for some absurd reason. You might need that on your > > library path. >=20 > I had added to my ld.so.conf file (and executed ldconfig) but didnt > change anything. >=20 > I will try with the regular javac. >=20 > > > > AfC > > Sydney >=20 > Best regards, > Khiraly >=20 >=20 > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > java-gnome-developer mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-gnome-developer >=20 --=20 Jeffrey Morgan "The highest reward for a man's toil is not what he gets for it, but what he becomes by it" - Jon Ruskin |