Compiling SWT application with GNU gcj

Nivox zito.andrea@gmail.com
Tue Oct 11 12:29:00 GMT 2005


> Make sure libgcj6-dev and libgcj-dev are installed. These are needed
> when compiling to native (not when compiling to bytecode).
>
>
> Cheers,
> Michael

You're right... on that machine I didn't have libgcj-dev... I installed it
but the main problem remain (on the other machine I already have that
installed...):

--------------------------------------------------------------------------------
nivox@host:~/Test$ gcj --main=Test --classpath ./swt/swt.jar
test/swt/Test.java -Lswt -lswt-gtk-3138
/tmp/ccpNrmdo.o(.text+0x2b): In function `main':
: undefined reference to `Test::class$'
/tmp/ccLhin1t.o(.text+0x1f): In function
`test::swt::Test::main(JArray<java::lang::String*>*)':
: undefined reference to `org::eclipse::swt::widgets::Display::class$'
/tmp/ccLhin1t.o(.text+0x2e): In function
`test::swt::Test::main(JArray<java::lang::String*>*)':
: undefined reference to
`org::eclipse::swt::widgets::Display::Display[in-charge]()'
/tmp/ccLhin1t.o(.text+0x42): In function
`test::swt::Test::main(JArray<java::lang::String*>*)':
: undefined reference to `org::eclipse::swt::widgets::Shell::class$'
/tmp/ccLhin1t.o(.text+0x58): In function
`test::swt::Test::main(JArray<java::lang::String*>*)':
: undefined reference to
`org::eclipse::swt::widgets::Shell::Shell[in-charge](org::eclipse::swt::widgets::Display*)'
/tmp/ccLhin1t.o(.text+0x6c): In function
`test::swt::Test::main(JArray<java::lang::String*>*)':
: undefined reference to `org::eclipse::swt::layout::GridLayout::class$'
/tmp/ccLhin1t.o(.text+0x88): In function
`test::swt::Test::main(JArray<java::lang::String*>*)':
: undefined reference to
`org::eclipse::swt::layout::GridLayout::GridLayout[in-charge](int, bool)'
/tmp/ccLhin1t.o(.text+0xc9): In function
`test::swt::Test::main(JArray<java::lang::String*>*)':
: undefined reference to `org::eclipse::swt::widgets::Composite::class$'
--------------------------------------------------------------------------------

It seems to me like gcj doesn't find libswt-gtk-3138. But I've tried to
put all the .so include in the swt package in my path, so I'm pretty sure
that gcj found them.

The thing that surprise me more than evrything is this part of the output:
  In function `main': undefined reference to `Test::class$'

This would mean that gcj doesn't find the Test class?

Thanks for the help.
Andrea Zito
-- 
Nivox

Linux Registered User #290686
Powered by: Debian Testing/Unstable
JABBER: nivox@jabber.linux.it
GPG Key ID: 0xC6A50D8D (info: www.gnupg.org)
GPG Keyserver: http://keyserver.linux.it



More information about the Java mailing list