Donal Riordan wrote:
Hi, sorry to re-open this problem but compiling SWT applications for
multiple distros is proving troublesome.
For my test case I'm trying to compile a simple 'hello world' swt app on
Ubuntu and have the executable run on a fresh Fedora installation (it's
a vm-ware image in case that matters).
On Ubuntu I compile the libswt.a library using:
gcj -c -findirect-dispatch -fjni swt.jar -o libswt.a
and then compile my application using:
gcj -fjni -findirect-dispatch -classpath swt.jar --main=SWT SWT.java -o
swt-ubuntu -L. -Wl,--no-whole-archive -lswt
The resultant executable works fine in Ubuntu but when I try to execute
it in Fedora I get libgcj linking problems again:
error while loading shared libraries: libgcj.so.81: cannot open shared
object file: No such file or directory
I've been able to compile non-SWT programs in Ubuntu such that they run
correctly on Fedora - I only encounter this problem when I try to use SWT.
Well, I could debug it but I don't have the code, so either you'll have to
produce a small (very small) test case that demonstrates the problem, or
you'll have to debug it yourself. Clearly, someone is retaining a hard
link against libgcj, but I don't know which file it is.
Andrew.