Trouble compiling swt.jar

Nivox zito.andrea_nosp@m_gmail.com
Mon Nov 21 15:17:00 GMT 2005


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@jabber.linux.it
GPG Key ID: 0xC6A50D8D (info: www.gnupg.org)
GPG Keyserver: http://keyserver.linux.it


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://gcc.gnu.org/pipermail/java/attachments/20051121/4d6d9a9f/attachment.sig>


More information about the Java mailing list