From: gisle@kondor.ii.uib.no (Gisle S�lensminde)
Subject: Re: ADA 95 C++ and Solaris
Date: 1999/11/21
Date: 1999-11-21T00:00:00+00:00 [thread overview]
Message-ID: <slrn83g0e3.cr.gisle@kondor.ii.uib.no> (raw)
In-Reply-To: x7vpux5oxgd.fsf@pogner.demon.co.uk
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.
--
Gisle S�lensminde ( gisle@ii.uib.no )
next prev parent reply other threads:[~1999-11-21 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 [this message]
1999-11-22 0:00 ` bourguet
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