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]

SwingWT-GCJ compilation problem


I'm sorry to bother everyone here, but I can't figure out how to compile
my program properly.
I'm trying to compile with GCJ a demo program for my graph library,
which makes use of SwingWT and the JEP math parser. The program compiles
and runs properly in the VM in Eclipse, what I'm trying to do is to
obtain a native version.
I'm using the commands as described below, basically following what the
SwingWT demo Makefile does (as the native demo provided with SwingWT
compiles and runs just fine on my machine, so I expected my program to
work as well if compiled at the same conditions).

My piece of software is made by a number of classes placed in a
net/ directory and the JEP library jar and is compiled as follows:

gcj -Ilib/swingwt.jar -Ilib/swt.jar -Ilib/swt-pi.jar
-Ilib/swt-mozilla.jar -Ilib/jep-2.24.jar -c $(find -name "*.java") -o
demo.o

That produces the expected demo.o object file (the -Ilib/jep-2.24.jar
part is because the program uses the JEP library). Then I compile JEP:

gcj -c lib/jep-2.24.jar 

Again with no errors, obtaining the jep-2.24.o file. Now, I link
everything:

gcj --main=net.moioli.graph.swingwt.demos.SuccessionDemo -o demo demo.o
jep-2.24.o lib/libswt.so lib/libswingwt.so

(where lib/libswt.so and lib/libswingwt.so are freshly cleanly compiled
from SwingWT Makefile). I obtain the "demo" executable. When I run it I
get:
libgcj failure: Duplicate class registration:
org.eclipse.swt.internal.Platform
Aborted

I'm using SwingWT 0.86.1, the SWT provided with that and freshly
recompiled (again, the SwingWT demo compiles and runs fine).

Do you have any ideas about what went wrong?
I can provide any further details (even all the source code) if needed.

Thanks in advance
-- 
Silvio Moioli
www.moioli.net
silvio at moioli dot net
"Things should be as simple as possible, but not any simpler" Albert
Einstein


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