GCJ static executable

squeeto@canada.com squeeto@canada.com
Fri Aug 15 05:14:00 GMT 2003


java at gcc dot gnu dot org 
How do I create a static executable not requiring the
swt-win32-xxxx.dll with mingw, gcj, swt and Win98se?
I've read most of the past messages in the archives and
I have pieced this together (briefly):
1- unzip the thisiscool-gcc33 (or 3.4)
2- set the bin directory in the autoexec.bat path,
reboot
3- using the Freestyler swt.jar in a temp directory,
extract the .java files
note- Library.java has the loadLibrary calls removed 
4- gcj -fjni -g0 -c -o all the java files
5- ar -rcs the object files into a single native
library libswt.a
6- ar -rcs SWT and Callback into libswtjni.a
7- copy swt.jar, libswt.a and libswtjni.a to a working
directory with test1.java
gcj -mwindows -O2 --classpath=.\swt.jar -Xlinker
--start-group libswt.a -Wl,--whole-archive libswtjni.a
-Wl,--no-whole-archive -Xlinker --end-group test1.java
--main=test1 -o test1 -export-dynamic
Why does this produce:
... error: Type 'Display' not found in declaration of
field 'display'.
 Display display;
Actually all the components (Display, Shell, Text,
Button and SelectionEvent)
5 errors
import org.eclipse.swt.*;
import org.eclipse.swt.widgets.*;
import org.eclipse.swt.events.*;
public class test1{
...
Thanks for the help, Squeeto


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /