Compiling SWT application with GNU gcj
Tom Tromey
tromey@redhat.com
Wed Oct 12 15:09:00 GMT 2005
>>>>> "Nivox" == Nivox <zito.andrea@gmail.com> writes:
It would be really helpful if someone migrated the FAQ to the Wiki.
These linking problems seem to come up a fair amount, and nobody
really maintains the old FAQ...
Nivox> /tmp/ccLhin1t.o(.text+0x1f): In function
Nivox> `test::swt::Test::main(JArray<java::lang::String*>*)':
Nivox> : undefined reference to `org::eclipse::swt::widgets::Display::class$'
When compiling code the way that you are, you must also compile all
the jars you depend on and link them into your program.
Nivox> The thing that surprise me more than evrything is this part of the output:
Nivox> In function `main': undefined reference to `Test::class$'
Nivox> This would mean that gcj doesn't find the Test class?
The argument to --main is the fully qualified class name.
In this case I think it is probably 'test.swt.Test'.
Tom
More information about the Java
mailing list