From: ncohen@watson.ibm.com (Norman H. Cohen)
Subject: Re: Calling C++ from within ADA
Date: 3 Nov 1994 15:11:16 GMT
Date: 1994-11-03T15:11:16+00:00 [thread overview]
Message-ID: <39auik$129i@watnews1.watson.ibm.com> (raw)
In-Reply-To: CVANOVER.1.0007E49E@bamanet.ua.edu
In article <CVANOVER.1.0007E49E@bamanet.ua.edu>, CVANOVER@bamanet.ua.edu
writes:
|> Is there a way to call a C++ procedure from within ADA? I can call a C
|> procedure with
|>
|> package C_LIB is
|> procedure clear_screen;
|> procedure sleep_a_moment;
|> private
|> pragma interface(c,clear_screen);
|> pragma interface(c,sleep_a_moment);
|> end C_LIB;
|>
|> However, when I compile the same C procedure in C++ I get the following error:
|> 0706-317 ERROR: Unresolved or undefined symbols detected:
|> Symbols in error (followed by references) are
|> dumped to the load map.
|> The -bloadmap:<filename> option will create a load map.
|> .clear_screen
|>
|> I've tried adding INTERFACE_INFORMATION but it doesn't seem to help.
|>
|> I am using IBM AIX on an RS6000.
The error message comes from the linker, ld, which is invoked by the
compiler when you compile with -b or -m (to construct an executable main
program). I suspect that your C++ compiler is creating a "mangled"
external name for clear_screen, rather than the name .clear_screen
created by your C compiler. Use the AIX nm command to see the external
symbols in the .o file produced by your C++ compiler, and, if you can
figure out which one is a mangled name for clear_screen, adjust your
Interface_Information pragma accordingly.
--
Norman H. Cohen ncohen@watson.ibm.com
next prev parent reply other threads:[~1994-11-03 15:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-11-03 12:53 Calling C++ from within ADA CVANOVER
1994-11-03 15:11 ` Norman H. Cohen [this message]
[not found] ` <CypvDM.8q5@nntpa.cb.att.com>
1994-11-04 17:31 ` Greg Harvey
1994-11-04 17:46 ` Greg Harvey
1994-11-07 2:52 ` Oliver E. Cole
1994-11-08 15:22 ` Eric Beser
1994-11-08 18:34 ` Richard G. Hash
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox