From: Brian on
Hi I have an ADA function that I'd like to call from my C program.

Is there any way to provide a .h file containing a C prototype for the
ADA function and then link the ADA with the C? Does anyone have any
experience of this?

I'm using a GNU setup on Linux.

Thanks.

From: Harald van Dijk on
On Wed, 02 Jan 2008 23:33:10 +0100, Brian wrote:
> Hi I have an ADA function that I'd like to call from my C program.
>
> Is there any way to provide a .h file containing a C prototype for the
> ADA function and then link the ADA with the C? Does anyone have any
> experience of this?

C doesn't define how to mix C with other languages. I believe Ada does
define how to mix Ada with other languages, so you're better off asking
in an Ada newsgroup.
From: Keith Thompson on
Brian <nospam(a)nospam.invalid> writes:
> Hi I have an ADA function that I'd like to call from my C program.
>
> Is there any way to provide a .h file containing a C prototype for the
> ADA function and then link the ADA with the C? Does anyone have any
> experience of this?
>
> I'm using a GNU setup on Linux.

Ada (not "ADA"; it's not an acronym) provides mechanisms for
cross-language calls between Ada and C; C does not. The folks in
comp.lang.c won't be able to answer your question. I've redirected
followups just to comp.lang.ada, and I suggest that others do
likewise.

--
Keith Thompson (The_Other_Keith) <kst-u(a)mib.org>
[...]
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"