gcc/gcj 3.4 - bug report

rezaei@promail.com rezaei@promail.com
Fri Jul 18 23:15:00 GMT 2003


Preface: I downloaded gcc34-20030630.zip from Mohan's site and built the 
hello swt example. all works. thanks for all the hard work.
I have two bugs to report. 
1) compiling with -lswt puts the "-lswt" in the wrong place when ld is called. 
My build command is:
gcj -v --main=net.sourceforge.swtsolitaire.SwtMain --
classpath=%SWT_JAVA_LIB_DIR%\swt.jar -s -o test.exe jars\commons-
collections.jar jars\commons-logging-api-nojdk14.jar jars\jui-0.10m.jar 
jars\test.jar %SWT_GCJ_LIB_DIR%\SWTMessages.o -
L%SWT_GCJ_LIB_DIR% -lswt 
Somehow, -lswt ends up before SWTMessages.o and ld won't recognize it. I 
had to change the spec file and force -lswt to be appeneded at the very end 
as a workaround. Note: I *didn't* have to do this with the example; I think it 
has to do with the multiple jars.
2) I've attached a very simple (15 line) swt program that works fine with 
java.exe, but fails when compiled to native code. The bug has to do with 
image loading. I think this is pretty much a show stopper for any application.
2a) This is preliminary, but when I removed the swt image load statements, 
and 
tried to load the images via the regular java api, I got:
Exception in thread "Thread-1" java.awt.AWTError: Cannot load AWT toolkit:
 at 0x00714eee (Unknown Source)
...
 at 0x7c4e9878 (Unknown Source)
Caused by: java.lang.ClassNotFoundException:
 at 0x00714eee (Unknown Source)
...
If any of this is not clear, please let me know.
Thanks
Moh


More information about the Java mailing list

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