Mixing compilers on AIX

Mixing compilers on AIX

Post by dew » Fri, 28 Sep 2001 05:35:06



I've been writing a shared object on AIX using xlC.  I
am wondering if a application compiled with gnu will
be able to link to this object correctly?  

Thanks,
Mark

 
 
 

Mixing compilers on AIX

Post by Mark Mendel » Fri, 28 Sep 2001 11:37:05


You should be able to link to gcc compiled C programs.  g++ compiled C++
programs will not work, in general.

Mark Mendell


Quote:> I've been writing a shared object on AIX using xlC.  I
> am wondering if a application compiled with gnu will
> be able to link to this object correctly?  

> Thanks,
> Mark


 
 
 

Mixing compilers on AIX

Post by Paul Pluzhniko » Fri, 28 Sep 2001 23:46:00



Quote:> I've been writing a shared object on AIX using xlC.  I
> am wondering if a application compiled with gnu will
> be able to link to this object correctly?

C compilers are link-compatible.
C++ compilers are not.

If the shared object exports 'C'-callable API,
there should be no problems.

 
 
 

Mixing compilers on AIX

Post by dew » Sat, 29 Sep 2001 21:58:58





> > I've been writing a shared object on AIX using xlC.  I
> > am wondering if a application compiled with gnu will
> > be able to link to this object correctly?

> C compilers are link-compatible.
> C++ compilers are not.

> If the shared object exports 'C'-callable API,
> there should be no problems.

How do you do this?  I tried using extern "C"  in front of my function
declarations but when i did a dump of the object file the name
appeared to still be mangled.

Mark