building SWT with more than one source file

Andrew.Ferguson@arm.com Andrew.Ferguson@arm.com
Tue Mar 25 16:35:00 GMT 2003


hi,

 I am building some java source using SWT by typing

gcj --main=SWTTest --classpath=%SWT_JAVA_LIB_DIR%\swt.jar;. -o SWTTest.exe
-L%SWT_GCJ_LIB_DIR% -lswt SWTTest.java

and this works fine. But if I alter SWTTest to need to use a second source
file, and include this file on the command line (its pure java - no SWT)
then I get a long list of errors

gcj --main=SWTTest --classpath=%SWT_JAVA_LIB_DIR%\swt.jar;. -o SWTTest.exe
-L%SWT_GCJ_LIB_DIR% -lswt SWTTest.java Other.java

is this the correct way to be including multiple source files?

thanks,
Andrew

the errors are like:

SWTTest.java:10: undefined reference to
`org::eclipse::swt::widgets::Display::class$'
C:\DOCUME~1\aferguso\LOCALS~1\Temp/ccmkbaaa.o(.text+0x61):SWTTest.java:10:
undefined reference to `org::eclipse::swt::widgets::Display::Display()'
C:\DOCUME~1\aferguso\LOCALS~1\Temp/ccmkbaaa.o(.text+0x76):SWTTest.java:11:
undefined reference to `org::eclipse::swt::widgets::Shell::class$'
C:\DOCUME~1\aferguso\LOCALS~1\Temp/ccmkbaaa.o(.text+0x8d):SWTTest.java:11:
undefined reference to
`org::eclipse::swt::widgets::Shell::Shell(org::eclipse::swt::widget
s::Display*)'
C:\DOCUME~1\aferguso\LOCALS~1\Temp/ccmkbaaa.o(.text+0x9f):SWTTest.java:12:
undefined reference to `org::eclipse::swt::layout::RowLayout::class$'
C:\DOCUME~1\aferguso\LOCALS~1\Temp/ccmkbaaa.o(.text+0xb2):SWTTest.java:12:
undefined reference to `org::eclipse::swt::layout::RowLayout::RowLayout()'
C:\DOCUME~1\aferguso\LOCALS~1\Temp/ccmkbaaa.o(.text+0x108):SWTTest.java:17:
undefined reference to `org::eclipse::swt::widgets::Label::class$'
C:\DOCUME~1\aferguso\LOCALS~1\Temp/ccmkbaaa.o(.text+0x124):SWTTest.java:17:
undefined reference to
`org::eclipse::swt::widgets::Label::Label(org::eclipse::swt::widge
ts::Composite*, int)'




More information about the Java mailing list