comp.lang.ada
 help / color / mirror / Atom feed
From: Lucretia <lucretia9@lycos.co.uk>
Subject: Re: C and ADA
Date: Wed, 2 Jan 2008 15:09:12 -0800 (PST)
Date: 2008-01-02T15:09:12-08:00	[thread overview]
Message-ID: <ef41ced5-17f1-42fa-bc35-debd78f28ef2@s12g2000prg.googlegroups.com> (raw)
In-Reply-To: slrnfno496.3gs.nospam@nospam.invalid

On Jan 2, 10:33 pm, Brian <nos...@nospam.invalid> 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?
>
> I'm using a GNU setup on Linux.
>
> Thanks.

You can add a "pragma Export" to your procedure and compile it with
gnat. There is a chapter on mixed language programming in the GNAT
manual. But I think you might end up having to build the app with
gnat. Surely porting the procedure would be easier?

Luke.



  parent reply	other threads:[~2008-01-02 23:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-02 22:33 C and ADA Brian
2008-01-02 22:44 ` Harald van Dijk
2008-01-02 22:47 ` Keith Thompson
2008-01-02 23:09 ` Lucretia [this message]
2008-01-03  7:38 ` Jerry
  -- strict thread matches above, loose matches on Subject: below --
1998-10-22  0:00 C++ and Ada yuen3785
1998-10-22  0:00 yuen3785
1998-10-23  0:00 ` Stephen Leake
1998-10-23  0:00 ` Jerry van Dijk
replies disabled

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