From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: C interface - Apex/Verdix
Date: 1997/06/07
Date: 1997-06-07T00:00:00+00:00 [thread overview]
Message-ID: <dewar.865692880@merv> (raw)
In-Reply-To: 3395DC9F.3A25@lmco.com
Gary says
<<I am coding in Ada95 (for the first time) using the Apex Ada 2.2.3A
compiler and need to interface with C/C++ code compiled using the Sun
compiler. I am able to link a main Ada program with a C procedure using
the pragma Import but I have to supply the "mangled" C linker_name. To
get this name I have to use the UNIX "nm" command on the object file.
This seems dangerous if the C compiler ever decides to change the way
this "mangled" name is generated. Do you know of a better way around
this? My platform is Sun Solaris 2.5.1. Can I use this VADS language
package and if so, where is it?
>>
This kind of manual mangling is not required in Ada 95 to interface with
C code. Assuming you have a full language implementation that supports
C as a language name in Import, then using the name as it is used in
the C program as the External_Name parameter (as opposed to the Linker_Name)
must work correctly. If it does not, then this is a clear bug that should be
reported to the vendor.
prev parent reply other threads:[~1997-06-07 0:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-05-29 0:00 C interface - Apex/Verdix Paul Van Bellinghen
1997-05-29 0:00 ` Christopher Green
1997-05-30 0:00 ` Mark Bennison
1997-06-04 0:00 ` Gary Brumfield
1997-06-06 0:00 ` Arthur Schwarz
1997-06-07 0:00 ` Robert Dewar [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