importing classes
Tom Tromey
tromey@cygnus.com
Tue Jun 6 11:41:00 GMT 2000
>>>>> "David" == David N Welton <davidw@linuxcare.com> writes:
David> @eugene [~/test] $ gcj --main=Bar Bar.java
David> /tmp/ccQaTQkU.o: In function `Bar::main(JArray<java::lang::String *>
David> *)':
David> /home/davidw/test/Bar.java(.text+0x99): undefined reference to
David> `_CL_Q33gnu4math6IntNum'
David> /home/davidw/test/Bar.java(.text+0xa9): undefined reference to
David> `gnu::math::IntNum::IntNum(int)'
David> collect2: ld returned 1 exit status
David> I have a feeling I'm "not getting it" in some way. Would
David> someone care to enlighten me?
You're compiling against a class but not linking against the compiled
version of that class. So, you get a link error.
One fix would be to compile the class an explicltly link it in to your
program.
Tom
More information about the Java
mailing list