I'm a complete Ada newbie, though I've used Pascal for 2-3 years during HS.
IIRC, it is possible to call Pascal compiled functions from C/C++. Is it possible to call procedures & functions written in Ada from C++?
I'm a complete Ada newbie, though I've used Pascal for 2-3 years during HS.
IIRC, it is possible to call Pascal compiled functions from C/C++. Is it possible to call procedures & functions written in Ada from C++?
According to this old tutorial, it should be possible.
However, as illustrated by this thread, you must be careful with the c++ extern "C" definitions of your Ada functions.
Absolutely it's possible. For the past five years I've been working on a system that mixes C++ and Ada.
That kind of thing is done all the time. The trick is to tell both sides to use a "C"-style calling protocol for the routine. In C++ this is done with extern "C" declarations, and in the Ada side with pragma Export ("C", ...
Look those up in your favorite respective reference sources for details. Watch out for pointer and reference paramters!