comp.lang.ada
 help / color / mirror / Atom feed
From: beckwb@ois.com (R. William Beckwith)
Subject: Re: Ada/C++ interface (SPARC Works)
Date: 1995/04/22
Date: 1995-04-22T00:00:00+00:00	[thread overview]
Message-ID: <3nc0jl$3ng@gamma.ois.com> (raw)
In-Reply-To: dkumar.798311808@blackcat

Deepak Kumar (dkumar@blackcat) wrote:
: Has anyone tried to interface/use C++ code through Ada programs successfully
: using the SUN Ada and SUN C++ compilers?

: I have some code that uses a C library function, I compile this with the
: SPARC C++ compiler and it doesn't link with the Ada code. if I compile
: it with GCC it links just fine.

C++ compilers mangle function names.  You either must have or define a C only
interface.  You can tell the C++ compiler not to mangle certain C code:

extern "C" {

    ...

};

Then compile the code with the Sun C++ compiler.  Your Ada pragma's can
then resolve to the unmangled names.




      parent reply	other threads:[~1995-04-22  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-04-19  0:00 Ada/C++ interface (SPARC Works) Deepak Kumar
1995-04-20  0:00 ` James Hopper
1995-04-22  0:00 ` R. William Beckwith [this message]
replies disabled

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