undefined reference: compiling swt using gcj
Hello guys
I'm trying to make an exe from a java code, using GCJ and SWT
My code is this:
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
publicclass TestExe{
/**
* @param args
*/
publicstaticvoid main(String[] args){
Display display =new Display();
Shell shell =new Shell(display);
MessageBox message =new MessageBox(shell,SWT.OK|
SWT.CANCEL|
SWT.ICON_WARNING);
message.setText("Message from SWT");
message.setMessage("hello");
message.open();
}
}
It is just a simple hello world class using swt...
I compile doing this:
gcj -c -I/cygdrive/f/gcc40-20051104/thisiscool-gcc/swt/win32/3138/swt.jar --classpath=. TestExe.java
gcj --main=TestExe TestExe.o -L/cygdrive/f/gcc40-20051104/thisiscool-gcc/swt/win32/3138 -lswt -o TestExe.exe
and I get the error:
...undefined reference to 'TestExe::class$'
I think I've looked at all the articles on google about how to compile swt with GCJ, but I never find a satisfying answer.
I know there is something wrong in my commands, even if I did a lot of possible combinations...
can someone help me here? I spent to much time looking for the answer, and now I'm tired :-(
Thanks for any help
Philippe

