comp.lang.ada
 help / color / mirror / Atom feed
* C/Ada bind error using gcc/ld
@ 2004-04-22 16:55 Joe Ellis
  0 siblings, 0 replies; only message in thread
From: Joe Ellis @ 2004-04-22 16:55 UTC (permalink / raw)


I am trying to build an executable and am getting the following error
from the ld linker.  I am wondering what I may have done incorrectly
in building Ada or if this is a problem with the actual ld/gcc
linker/compiler?

Here's the output (I've also tried libgnat.a and libgnarl.a as static
libraries instead of shared objects, but the error is the same):

g++ -Wl,-rpath,/usr/local/src/qt/lib -o MainExe .obj/main.o
.obj/testwin.o .obj/perf.o -L/usr/local/src/qt/lib -L/usr/X11R6/lib
/usr/local/src/libs/libwmap.a  -lrt -lgnat -lgnarl -lqt -lXext -lX11
-lm
/usr/local/src/libs/libwmap.a(b~customize.o): In function `adainit':
b~customize.o(.text+0x51): undefined reference to
`interfaces__c_streams___elabs'
/usr/bin/ld: BFD 2.13.90.0.2 20020802 internal error, aborting at
elf32-i386.c line 2404 in elf_i386_relocate_section

/usr/bin/ld: Please report this bug.

collect2: ld returned 1 exit status
make: *** [LW20b] Error 1

I verified using 'nm' that the symbol 'interfaces__c_streams___elabs'
is defined in libgnat.so (and libgnat.a) so I don't understand why the
linker couldn't resolve the symbol.  The libraries are in the correct
gcc/adalib directory as well.

Now, b~customize.o was built, and then archived into libwmap.a, in the
following manner:

(use gcc to build ada file:) make -A/usr/local/src/si-dev/src/Ada95
-A/usr/local/src/si-dev/src/C -A/usr/local/src/libs/lib_ada -u -c
customize.adb -cargs -fno-rtti

(note this is the same as gnatbind:) gnatmake -b
-A/usr/local/src/lwsi-dev/src/Ada95 -A/usr/local/src/lwsi-dev/src/C
-A/usr/local/src/libs/lib_ada customize.ali -cargs -fno-rtti -bargs -n

gcc -fno-rtti -c b~customize.adb

Any ideas on what could be wrong here?

Thanks,

Joe

gcc= 3.2
kernel=2.4.18-4



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-04-22 16:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-22 16:55 C/Ada bind error using gcc/ld Joe Ellis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox