This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
GCJ linking problem with inherited classes in jar
- From: "Bu Bacoo" <bubacoo at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 6 Feb 2007 10:58:46 +0100
- Subject: GCJ linking problem with inherited classes in jar
Hello
Please, how do I link some 'inherited' objects?
Explained: I want to build simple test program, which uses log4j
(building it with Sun's JDK into .class bytecode and running inside
their VM works ok)
gcj -o logTest --main=logTest --classpath=./log4j.jar logTest.java
I get:
/tmp/ccmlhniA.o: In function `logTest::__U3c_clinit__U3e_()':
logTest.java:(.text+0x16): undefined reference to
`org::apache::log4j::Category::getInstance(java::lang::String*)'
/tmp/ccmlhniA.o: In function `logTest::main(JArray<java::lang::String*>*)':
logTest.java:(.text+0x295): undefined reference to
`org::apache::log4j::Priority::class$'
logTest.java:(.text+0x2ad): undefined reference to
`org::apache::log4j::Priority::DEBUG'
/tmp/ccmlhniA.o:(.data+0x188): undefined reference to
`org::apache::log4j::Category::class$'
collect2: ld returned 1 exit status
libgcj.jar is linked by default, log4.jar was added by me. Is there
neccessity of some additional libraries, which are not included in
log4j but maybe I can get them from some jvm's libs?
Any idea please?
Thanks
Bu