GCJ Swing/AWT working on OS X -- article
Bryce McKinlay
mckinlay@redhat.com
Thu Jul 22 01:02:00 GMT 2004
John Gabriele wrote:
> Thanks Bryce.
>> Should I be adding a '-l' arg to my build command line?
> (note, my gnome-related libs are in ~/src/gnome/objdir/lib)
> Hmm... here's what that gets me:
>> ~/temp/gcj_stuff $ gcj -o baz --main=TestAWT -l ~/src/gnome/objdir/lib
> TestAWT.java
> /usr/bin/ld: can't locate file for: -l/Users/john/src/gnome/objdir/lib
> collect2: ld returned 1 exit status
Normally, libgcj will look for the toolkit classes in a file called
lib-gnu-java-awt-peer-gtk.so (.dylib on OS X) in your LD_LIBRARY_PATH
(DYLD_LIBRARY_PATH on OS X).
So, try setting DYLD_LIBRARY_PATH to point to the directory containing
lib-gnu-java-awt-peer-gtk.dylib. If that doesn't work, it is possible
that the library loading mechanism that libgcj uses is not working
correctly on OS X.
Regards
Bryce
More information about the Java
mailing list