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]

Re: Linking errors with GCJ and SWT


James Lee wrote:

I am trying to compile a simple "Hello, World!" written in Java with
SWT.  The code is as follows:

There are a few swt libraries in /usr/lib:

/usr/lib/libswt-atk-gtk-3106.so /usr/lib/libswt-mozilla-gtk-3106.so /usr/lib/libswt-gnome-gtk-3106.so /usr/lib/libswt-pi-gtk-3106.so /usr/lib/libswt-gtk-3106.so

I have tried every and all of them. I just don't understand. I'd be
happy to provide anymore information. Thanks for the help!


Those look like the JNI libraries for SWT, ie they contain the C code part of SWT? You'll need to compile the SWT Java code (jar file) into its own .so, and link against that.

You don't need to link the JNI library as those will be loaded dynamically.

Bryce


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