comp.lang.ada
 help / color / mirror / Atom feed
* C  binding to Ada (not Ada to C)
@ 1999-05-28  0:00 The Hardys
  1999-05-29  0:00 ` Robert Dewar
  1999-05-30  0:00 ` Paul Hussein
  0 siblings, 2 replies; 4+ messages in thread
From: The Hardys @ 1999-05-28  0:00 UTC (permalink / raw)



    I have worked with Ada and am familiar with binds from an Ada main to C
routines, but during my development days a C main line with Ada as support
packages was not supported. Can this be done now, and if so are there any
good examples out there.

            Thanks in Advance
            Mike Hardy
            hardy@pce.net






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

* Re: C binding to Ada (not Ada to C)
  1999-05-28  0:00 C binding to Ada (not Ada to C) The Hardys
@ 1999-05-29  0:00 ` Robert Dewar
  1999-05-30  0:00 ` Paul Hussein
  1 sibling, 0 replies; 4+ messages in thread
From: Robert Dewar @ 1999-05-29  0:00 UTC (permalink / raw)


In article <7ini7i$otg1@darius.pce.net>,
  "The Hardys" <hardy@pce.net> wrote:
>
>     I have worked with Ada and am familiar with binds from an
Ada main to C
> routines, but during my development days a C main line with
Ada as support
> packages was not supported. Can this be done now, and if so
are there any
> good examples out there.


This is fully supported in Ada 95. You will need to consult
the documentation with your compiler for details. There is
a section in the GNAT manual specifically explaining how this
is done (GNAT itself has a C main program!)


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




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

* Re: C binding to Ada (not Ada to C)
  1999-05-30  0:00 ` Paul Hussein
@ 1999-05-30  0:00   ` Robert Dewar
  0 siblings, 0 replies; 4+ messages in thread
From: Robert Dewar @ 1999-05-30  0:00 UTC (permalink / raw)


In article <7ir26i$9vj$1@lure.pipex.net>,
  "Paul Hussein" <paul.hussein@dial.pipex.com> wrote:
> It is a compiler dependant thing, but most support it.

It is not a compiler dependent thing, it is a required part
of the language (if we are talking Ada = Ada 95)

> The tricky part is in elaborating the Ada.

Nothing tricky here, the method is portable and documented
clearly in the RM as a requirement for all implementations.

> Consult uour compilers docs.

You can write your sources (both C and Ada) from the RM
requirements, but you will probably need to consult your
compiler documentation to see exactly how the binding and
linking is done, since this is, as always compiler and
OS dependent.

Paul's answers here would have been appropriate five years ago
for Ada 83, but are not appropriate for Ada 95 (of course if
you are still stuck using Ada 83, then the five years old
comments still apply to you :-)


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




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

* Re: C  binding to Ada (not Ada to C)
  1999-05-28  0:00 C binding to Ada (not Ada to C) The Hardys
  1999-05-29  0:00 ` Robert Dewar
@ 1999-05-30  0:00 ` Paul Hussein
  1999-05-30  0:00   ` Robert Dewar
  1 sibling, 1 reply; 4+ messages in thread
From: Paul Hussein @ 1999-05-30  0:00 UTC (permalink / raw)


It is a compiler dependant thing, but most support it.
The tricky part is in elaborating the Ada.
Consult uour compilers docs.
The Hardys <hardy@pce.net> wrote in message
news:7ini7i$otg1@darius.pce.net...
>
>     I have worked with Ada and am familiar with binds from an Ada main to
C
> routines, but during my development days a C main line with Ada as support
> packages was not supported. Can this be done now, and if so are there any
> good examples out there.
>
>             Thanks in Advance
>             Mike Hardy
>             hardy@pce.net
>
>






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

end of thread, other threads:[~1999-05-30  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-05-28  0:00 C binding to Ada (not Ada to C) The Hardys
1999-05-29  0:00 ` Robert Dewar
1999-05-30  0:00 ` Paul Hussein
1999-05-30  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