comp.lang.ada
 help / color / mirror / Atom feed
From: jsa@organon.com (Jon S Anthony)
Subject: Re: Ada and Mesa
Date: 1996/06/12
Date: 1996-06-12T00:00:00+00:00	[thread overview]
Message-ID: <JSA.96Jun12111030@organon.com> (raw)
In-Reply-To: 4pkset$cgv@ss2.cs.mci.com


In article <4pkset$cgv@ss2.cs.mci.com> James_Rogers <jrogers> writes:

>  Linking to existing C object files is somewhat easier than linking
> to existing C++ object files.  C++ is more difficult due to the
> symbol name mangling produced so commonly by C++ compilers.  If you
> understand how to navigate the symbol mangling for your compiler
> then calling the function from Ada is easy.

This is just as true for C (or anything else) as Ada.  To interface
C++ to C (with C call into C++) you need to extern C the C++ stuff
to which you want access (whether from Ada or C).  This will keep
the name mangling at bay and you can use standard import pragmas.


>  If you do not understand how to navigate the symbol name mangling
> you will have great difficulty.

No matter what you are using.


>  The Ada compiler simply needs to know that the
> library object being called is a "C" type object, and its correct
> library name.  The C++ symbol mangling causes that correct library
> name to be unexpectedly complex.

I haven't had a chance to look at how GNAT gets around this issue.
Anyone have an elevator version of how ACT solves this problem?


/Jon
-- 
Jon Anthony
Organon Motives, Inc.
1 Williston Road, Suite 4
Belmont, MA 02178

617.484.3383
jsa@organon.com





  parent reply	other threads:[~1996-06-12  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-06-11  0:00 Ada and Mesa Ruediger Berlich
1996-06-11  0:00 ` James_Rogers
1996-06-12  0:00   ` Robert Dewar
1996-06-12  0:00   ` Jon S Anthony [this message]
1996-06-12  0:00 ` Robert Dewar
1996-06-12  0:00 ` Jon S Anthony
1996-06-12  0:00   ` Pascal Obry
1996-06-12  0:00 ` James E. Hopper
replies disabled

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