From: bourguet@my-deja.com
Subject: Re: ADA 95 C++ and Solaris
Date: 1999/11/22
Date: 1999-11-22T00:00:00+00:00 [thread overview]
Message-ID: <81av2u$iaf$1@nnrp1.deja.com> (raw)
In-Reply-To: slrn83g0e3.cr.gisle@kondor.ii.uib.no
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1718 bytes --]
In article <slrn83g0e3.cr.gisle@kondor.ii.uib.no>,
gisle@kondor.ii.uib.no (Gisle S�lensminde) wrote:
> In article <x7vpux5oxgd.fsf@pogner.demon.co.uk>, Simon Wright wrote:
> >Olivier Fourel <olivier.fourel@animaths.com> writes:
> >
> >> I look for a way to link ADA95 code and C++ code.
> >>
> >> The ADA 95 program is compiled with GNAT 3.11 under Solaris 2.6 on
a
> >> SPARC station
> >> and I need to call functions written in a C++ library.
> >> Can anyone help me about this ?
> >
> >Your best starting place is probably[1] the documentation[2] for the
> >3.12p compiler (the 3.11p compiler behaves in the same way, I
> >believe). Look in the Users Guide for the section "Building mixed Ada
> >& C++ programs".
> >
>
> One comment: Your answer depends that the code is compiled with g++.
> If the code is compiled with a different c++ compiler, you can
> generally not expect it to be compatible with neither g++ nor
> GNAT c++ interfacing. The reason is that c++ compilers have
> different name mangling schemes. If your library is compiled with say
> Sun CC, you can't link it with GNAT c++ interface. If your library
> is i binary form or not is possible to compile with g++, you
> must use C conventions from both the Ada and c++ side.
Is this the result of your experience in interfacing gnat with C++?
I've never tried nor even intented to link with C++ but from what I
recall from that part of the documentation, the mechanism used by gnat
is generic enough to interface with every C++ compiler. I think for
example that Dec and SGI who deliver Gnat to their customers what it to
interface with their C++ compiler.
Yours,
-- Jean-Marc
Sent via Deja.com http://www.deja.com/
Before you buy.
next prev parent reply other threads:[~1999-11-22 0:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-11-16 0:00 ADA 95 C++ and Solaris Olivier Fourel
1999-11-20 0:00 ` Simon Wright
1999-11-21 0:00 ` Gisle S�lensminde
1999-11-22 0:00 ` bourguet [this message]
1999-11-22 0:00 ` Robert Dewar
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox