NewBie: ld linker problem
indio@technologist.com
indio@technologist.com
Sat Apr 1 00:00:00 GMT 2000
Hello!
I'm a NewBie with the "ld" linker.
I compiled a little program with gcj:
> gcj --main=LittleProgram -o little LittleProgram.java
The program (little) works fine. I am trying link it now with libgcj:
> ld -o little.o -lgcj little
But something is wrong. What?
little: In function `fde_split':
/tmp/gcc-2.95.2/gcc/frame.c(*ABS*+0x8054984): multiple definition of
`_DYNAMIC'/usr/local/lib/libgcj.so(.dynamic+0x0): first defined here little:
In function `fde_split': /tmp/gcc-2.95.2/gcc/frame.c(*ABS*+0x8051244): multiple
definition of `_etext' /tmp/gcc-2.95.2/gcc/frame.c(*ABS*+0x8054a4c): multiple
definition of `__bss_star t' /tmp/gcc-2.95.2/gcc/frame.c(*ABS*+0x8054a4c):
multiple definition of `_edata' /tmp/gcc-2.95.2/gcc/frame.c(*ABS*+0x8054894):
multiple definition of `_GLOBAL_OF FSET_TABLE_'
/usr/local/lib/libgcj.so(.got.plt+0x0): first defined here little: In function
`fde_split': /tmp/gcc-2.95.2/gcc/frame.c(*ABS*+0x8054e08): multiple definition of
`_end' /usr/local/lib/libgcj.so: undefined reference to `GC_find_start'
/usr/local/lib/libgcj.so: undefined reference to `deflate'
/usr/local/lib/libgcj.so: undefined reference to `GC_obj_kinds'
/usr/local/lib/libgcj.so: undefined reference to `GC_generic_malloc'
/usr/local/lib/libgcj.so: undefined reference to `inflate'
/usr/local/lib/libgcj.so: undefined reference to `GC_arrays'
/usr/local/lib/libgcj.so: undefined reference to `deflateSetDictionary'
/usr/local/lib/libgcj.so: undefined reference to `GC_gcollect'
/usr/local/lib/libgcj.so: undefined reference to `GC_signal_mark_stack_overflow'
/usr/local/lib/libgcj.so: undefined reference to `GC_add_to_black_list_normal'
/usr/local/lib/libgcj.so: undefined reference to `GC_n_mark_procs'
/usr/local/lib/libgcj.so: undefined reference to `GC_get_heap_size'
/usr/local/lib/libgcj.so: undefined reference to `GC_n_kinds'
...
etc
Thanks for your help!!! (My system: Linux RedHat 6.1 on i586)
More information about the Java
mailing list