AIX xlc and gcc/g++ Question
Fang-Pin Chang
fchang@qualcomm.com
Wed Apr 26 10:51:00 GMT 2000
Hi! I am trying to use a library (archive) that was built with GNU C/C++
with a C program that is built using AIX's xlc compiler.
The library has C interfaces that manipulates C++ objects declared within
the library as either static and/or global variables, and the C program
will be calling these C interface functions.
While the C program compiles and links fine, it core dumps upon execution.
The reason seems to be that the constructors for these static and/or global
C++ objects aren't being called. I wrote a simple test library plus some
test code, and these seem to bear out my reasoning for the aforementioned
core dump.
However, the C program I am trying to write will run just fine if I compile
it with the gcc compiler. But, I need it to work with the xlc compiler.
To get the C program to compile/link using xlc, I am linking in the
libgcc.a and libstc++.a as well.
What am I not doing or doing incorrectly?
My system is as follows:
AIX RS/6000 OS level v4.2.0.0
GNU C/C++ 2.8.1
xlc 4.3 (I think)
Any advice/help would be appreciated. Thanks!
--
Fang-Pin Chang
Qualcomm Incorporated
http://www.qualcomm.com
More information about the Gcc
mailing list