This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]