comp.lang.ada
 help / color / mirror / Atom feed
* Ada and C++; Any Gurus Out There?
@ 1999-06-02  0:00 Decker, Christian R
  1999-06-02  0:00 ` Robert Dewar
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Decker, Christian R @ 1999-06-02  0:00 UTC (permalink / raw)


I am attempting to interface an Ada program with C++ code and have run
across some interesting SNAFUs.

First when I try to link my ada code with the C++ object file I get
unresolved external errors.  This seems to be
because the C++ object files 'mangle' the names of functions and when the
Ada linker attempts to find the function
name in the object file, no luck.

Now, I know one can declare the C++ function as 'extern "C" blah blah' but
this really is a work around and not a
solution.  I am looking for a way to simply link Ada and C++ object files
such that no modifcations need to
be made to the C++ code.  I also would like to only have to mess with the
Ada code or Ada compiler/linker
options id possible.

My other problem, ( if i use the work around for the mangled function
names), is the use of C++ variables
declared as 'extern'.  if a C++ file referecnes an extern variable, when the
Ada linker does its thing it can not
resolve any variables that were declared as extern in the C++ code.

If anyone can help with this one, they are then man!  ( or woman as the case
may be! )....
Thanks!
Chris



   -**** Posted from RemarQ, http://www.remarq.com/?a ****-
 Search and Read Usenet Discussions in your Browser - FREE -




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1999-06-04  0:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-02  0:00 Ada and C++; Any Gurus Out There? Decker, Christian R
1999-06-02  0:00 ` Robert Dewar
1999-06-02  0:00 ` Gisle S�lensminde
1999-06-03  0:00   ` Robert Dewar
1999-06-03  0:00     ` Gisle S�lensminde
1999-06-04  0:00       ` Robert Dewar
1999-06-02  0:00 ` Tucker Taft

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