« Return to Thread: Trouble compiling swt.jar

Re: Trouble compiling swt.jar

by Nivox :: Rate this Message:

Reply to Author | View in Thread

Once upon a time Ryan wrote:
> I'm trying to compile swt.jar to swt.o so that I can make a native
> Windows executable from Java source that uses SWT (3.1.1) as the
> windowing toolkit.  When I try:
> gcj -c swt.jar
> I get several verification errors:
[CUT]

> The version of gcj in use is:
> $ gcj --version
> gcj.exe (GCC) 4.0.2

I've had the same problem. Try to compile this way:

gcj -c -fjni -findirect-dispatch swt.jar

then

gcj -c --classpath swt.jat YourSource.java
gcj --main=YourSource YourSource.o swt.o

This worked for me, the explanation for the -findirect-dispatch can be
found here:
http://gcc.gnu.org/wiki/How%20to%20BC%20compile%20with%20GCJ

I hpe this help.
Cheers Andrea
--
Nivox

Linux Registered User #290686
Powered by: Debian Testing/Unstable
JABBER: nivox@...
GPG Key ID: 0xC6A50D8D (info: www.gnupg.org)
GPG Keyserver: http://keyserver.linux.it




signature.asc (196 bytes) Download Attachment

 « Return to Thread: Trouble compiling swt.jar