comp.lang.ada
 help / color / mirror / Atom feed
* GNAT extern "C"
@ 1998-06-08  0:00 Matthew Benjamin
  1998-06-08  0:00 ` Robert Dewar
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Benjamin @ 1998-06-08  0:00 UTC (permalink / raw)



Ada gurus,

I've seen recent posts that describe compilation of the GNAT runtime system as 
a shared library, as well as calling external C functions.  (Of course, the 
latter capability is part of the standard.)

What I haven't figured out, though, if it is possible to export an Ada 
function/procedure as a C function in a shared library.  

The commercial compiler ObjectAda seems to be able to do this.  Can I do the 
same with GNAT?


Matt Benjamin




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: GNAT extern "C"
  1998-06-08  0:00 GNAT extern "C" Matthew Benjamin
@ 1998-06-08  0:00 ` Robert Dewar
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Dewar @ 1998-06-08  0:00 UTC (permalink / raw)



Matthew says

<<What I haven't figured out, though, if it is possible to export an Ada
function/procedure as a C function in a shared library.
>>

Yes, of course this is possible, why would you think it might not be. The
question is equivalent to whether it is possible to write a C function
in a shared library! pragma Export has exactly the effect of making an
Ada routine equivalent to a C one in terms of naming, parameter
passing mechanism etc.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1998-06-08  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-06-08  0:00 GNAT extern "C" Matthew Benjamin
1998-06-08  0:00 ` Robert Dewar

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