AIX: linking xlc libs with gcc
David Edelsohn
dje@watson.ibm.com
Tue Nov 7 07:26:00 GMT 2000
>>>>> Platzer Wolfgang writes:
Platzer> I created a shared lib on AIX 4.3.3 with
Platzer> xlC -qmkshrobj -o libtest *.o
Platzer> If I link a new program with this lib and xlC everything is fine.
Platzer> But if I use g++ for the same problem, there are a lot of errors like:
Platzer> ld: 0711-317 ERROR: Undefined symbol: .String::indexOf(String const &) const
Platzer> ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
Platzer> information.
Platzer> collect2: ld returned 8 exit status
Platzer> Since all system libs on AIX are most probably also created with xlC and
Platzer> linking with g++ is no problem, there should be a way of generating g++
Platzer> compatible libs with xlC?
Platzer> But how?
G++ and xlC are not compatible. The name mangling and exception
handling are completely different. One cannot use a G++ library with xlC
and one cannot use an xlC library with G++. Everything is compatible at
the C Language level, but not C++, which is much more compiler-dependent.
You must compile and create the shared library using G++ if you wish to
use it with G++.
Sorry, David
===============================================================================
David Edelsohn T.J. Watson Research Center
dje@watson.ibm.com P.O. Box 218
+1 914 945 4364 (TL 862) Yorktown Heights, NY 10598
More information about the Gcc
mailing list