undefined reference

marco@mherrn.de marco@mherrn.de
Tue Jun 22 22:56:00 GMT 2004


Hi,
> You need a binary version of the log4j package. Try doing it in steps 
> instead:
> $ gcj -I. -I/usr/share/java/log4j-1.2.jar Test.java -o Test.o
> $ gcj -c /usr/share/java/log4j-1.2.jar -o log4j-1.2.o
> $ gcj --main=Test -o Test Test.o log4j1-1.2.o

No, that still doesn't work. The first command already results in this:
----/----
/usr/lib/gcc-lib/i486-linux/3.3.4/../../../crt1.o(.text+0x18): In
function `_start':
../sysdeps/i386/elf/start.S:98: undefined reference to `main'
/tmp/ccLchKTa.o(.text+0x23): In function `Test::Test[in-charge]()':
: undefined reference to `org::apache::log4j::Logger::getRootLogger()'
/tmp/ccLchKTa.o(.data+0x4): undefined reference to
`org::apache::log4j::Logger::class$'
collect2: ld returned 1 exit status
----/----
But I also thought that gcj could links agains class files. At least
that was my impression after reading the FAQ on the website.
Marco
--
The more things change, the more they'll never be the same again
--
Marco Herrn _ ___ o ' (_)< _ _
 _>(__'> o 0 (_X %
 >(_`> O o _; _;'7^'_ \;\ %
(GnuPG/PGP-crypted mail preferred) _;\ _.\ _.';;) ;,;_/;
Key ID: 0x94620736 _ _'./_\('))_; );/\)}/`fsc


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /