comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@cs.nyu.edu (Robert Dewar)
Subject: Re: C Calling GNAT
Date: 1996/07/03
Date: 1996-07-03T00:00:00+00:00	[thread overview]
Message-ID: <dewar.836397292@schonberg> (raw)
In-Reply-To: 836384269.1@cs.york.ac.uk


Nigel asks

"Can anybody provide me with an example of how to
get a C function to call an Ada routine. All compiled
with gcc and GNAT? I assume that this is possible.
I know it is possible for Ada to call C routines,
but I need to have a C routine call Ada. Also how
would you go about passing parameters between the
two such as enumerated types (I assume integers, etc
are fairly straight-forward)"

The reference manual provides a basic description of how parameters are
passed, and how to use pragma Export to make an Ada routine that can be
called from C.

For information on how to setup GNAT with a non-Ada main program, see
the specific section in gnatinfo.txt on this topic.





      reply	other threads:[~1996-07-03  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-07-02  0:00 C Calling GNAT Nigel J. Tracey (4Y0)
1996-07-03  0:00 ` Nigel J. Tracey
1996-07-03  0:00   ` Robert Dewar [this message]
replies disabled

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