|
新装的RH9带有gcc的java支持,但是连helloWorld都通不过,错误如下:
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../crt1.o(.text+0x18): In function
`_start':
../sysdeps/i386/elf/start.S:77: undefined reference to `main'
/tmp/ccmJsb2Y.o(.text+0xf): In function `test::main(JArray<java::lang::String*>*)
':
: undefined reference to `_Jv_InitClass'
/tmp/ccmJsb2Y.o(.text+0x18): In function `test::main(JArray<java::lang::String*>*
)':
: undefined reference to `java::lang::System::class$'
/tmp/ccmJsb2Y.o(.text+0x2d): In function `test::main(JArray<java::lang::String*>*
)':
: undefined reference to `java::lang::System::class$'
/tmp/ccmJsb2Y.o(.text+0x32): In function `test::main(JArray<java::lang::String*>*)':
: undefined reference to `_Jv_InitClass'
/tmp/ccmJsb2Y.o(.text+0x3e): In function `test::main(JArray<java::lang::String*>*)':
: undefined reference to `java::lang::System:ut'
/tmp/ccmJsb2Y.o(.text+0x68): In function `test::test[in-charge]()':
: undefined reference to `java::lang::Object::Object[in-charge]()'
/tmp/ccmJsb2Y.o(.data+0x50): undefined reference to `java::lang::Object::finalize()'
/tmp/ccmJsb2Y.o(.data+0x54): undefined reference to `java::lang::Object::hashCode()'
/tmp/ccmJsb2Y.o(.data+0x58): undefined reference to `java::lang::Object::equals(java::lang::Object*)'
/tmp/ccmJsb2Y.o(.data+0x5c): undefined reference to `java::lang::Object::toString()'
/tmp/ccmJsb2Y.o(.data+0x60): undefined reference to `java::lang::Object::clone()'
/tmp/ccmJsb2Y.o(.data+0x80): undefined reference to `vtable for java::lang::Class'
/tmp/ccmJsb2Y.o(.data+0x94): undefined reference to `java::lang::Object::class$'
/tmp/ccmJsb2Y.o(.eh_frame+0x11): undefined reference to `__gcj_personality_v0'
collect2: ld returned 1 exit status
难道必须用JDK?
望各位指教! |
|