This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
AIX xlc and gcc/g++ Question
- To: gcc at gcc dot gnu dot org
- Subject: AIX xlc and gcc/g++ Question
- From: Fang-Pin Chang <fchang at qualcomm dot com>
- Date: Wed, 26 Apr 2000 10:52:17 -0700
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