* Using ADA procedures from C @ 1997-05-12 0:00 Rune Wemberg 1997-05-12 0:00 ` Michael Paus 1997-05-13 0:00 ` Robert Dewar 0 siblings, 2 replies; 6+ messages in thread From: Rune Wemberg @ 1997-05-12 0:00 UTC (permalink / raw) Hello! In the gnat reference manual I have read that it is possible to call ADA procedures from a C program. There are of course no examples. Anyone tried this? -- Rune Wemberg ruw@ffi.no ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Using ADA procedures from C 1997-05-12 0:00 Using ADA procedures from C Rune Wemberg @ 1997-05-12 0:00 ` Michael Paus 1997-05-13 0:00 ` Robert Dewar 1 sibling, 0 replies; 6+ messages in thread From: Michael Paus @ 1997-05-12 0:00 UTC (permalink / raw) In <5l78vs$nn0$1@luna.ffi.no> Rune Wemberg wrote: > Hello! > > In the gnat reference manual I have read that it is possible to > call ADA procedures from a C program. There are of course no > examples. > > Anyone tried this? Yes, I do that almost every day. It works just fine. Michael ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Using ADA procedures from C 1997-05-12 0:00 Using ADA procedures from C Rune Wemberg 1997-05-12 0:00 ` Michael Paus @ 1997-05-13 0:00 ` Robert Dewar 1997-05-14 0:00 ` Rune Wemberg 1 sibling, 1 reply; 6+ messages in thread From: Robert Dewar @ 1997-05-13 0:00 UTC (permalink / raw) Rune says <<In the gnat reference manual I have read that it is possible to call ADA procedures from a C procedure. There are of course no examples.>> First, I would like to reassure people that the GNAT reference manual (note caps!) does not mention calling ADA procedures, only Ada procedures :-) There are no examples because this is nothing special to do with GNAT. This is an absolutely standard RM required feature, so any Ada text will tell you how to do this using pragma Export. Don't expect the GNAT reference manual to be an Ada tutorial, that is not its function at all. It is not even a complete reference manual, in that basically the only detail is about things not covered by the standard RM. Now if your question is about how to compile and run such programs, then of course you look in the users guide, not the reference manual (the latter is only about language features and their syntax and semantics). In the users guide, you may find the section Mixed Language Programming helpful, it is an entire node, so it's hard to miss! ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Using ADA procedures from C 1997-05-13 0:00 ` Robert Dewar @ 1997-05-14 0:00 ` Rune Wemberg 1997-05-14 0:00 ` Robert Dewar 1997-05-15 0:00 ` root 0 siblings, 2 replies; 6+ messages in thread From: Rune Wemberg @ 1997-05-14 0:00 UTC (permalink / raw) Robert Dewar (dewar@merv.cs.nyu.edu) wrote: > Rune says > <<In the gnat reference manual I have read that it is possible to > call ADA procedures from a C procedure. There are of course no > examples.>> > Now if your question is about how to compile and run such programs, then > of course you look in the users guide, not the reference manual (the > latter is only about language features and their syntax and semantics). I know, I know.... > In the users guide, you may find the section > Mixed Language Programming > helpful, it is an entire node, so it's hard to miss! I have 5 different user guides for Ada 95. None of theese are discussing my problem. None of them got the section you are referring to. At the Internet, there are a site at http://www.adahome.com, which have the RM for Ada 95, but no users guide. Exactly what users guide are you referring to? -- Rune Wemberg ruw@ffi.no ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Using ADA procedures from C 1997-05-14 0:00 ` Rune Wemberg @ 1997-05-14 0:00 ` Robert Dewar 1997-05-15 0:00 ` root 1 sibling, 0 replies; 6+ messages in thread From: Robert Dewar @ 1997-05-14 0:00 UTC (permalink / raw) Rune says <<I have 5 different user guides for Ada 95. None of theese are discussing my problem. None of them got the section you are referring to. At the Internet, there are a site at http://www.adahome.com, which have the RM for Ada 95, but no users guide. Exactly what users guide are you referring to?>> I am referring to the GNAT users guide, one of two full GNAT manuals available from the same FTP sites from which you obtain GNAT compilers! ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Using ADA procedures from C 1997-05-14 0:00 ` Rune Wemberg 1997-05-14 0:00 ` Robert Dewar @ 1997-05-15 0:00 ` root 1 sibling, 0 replies; 6+ messages in thread From: root @ 1997-05-15 0:00 UTC (permalink / raw) On 14 May 1997, Rune Wemberg wrote: > Robert Dewar (dewar@merv.cs.nyu.edu) wrote: > > Rune says > > > <<In the gnat reference manual I have read that it is possible to > > call ADA procedures from a C procedure. There are of course no > > examples.>> > > > Now if your question is about how to compile and run such programs, then > > of course you look in the users guide, not the reference manual (the > > latter is only about language features and their syntax and semantics). > I know, I know.... > > > In the users guide, you may find the section > > > Mixed Language Programming > > > helpful, it is an entire node, so it's hard to miss! > > I have 5 different user guides for Ada 95. None of theese > are discussing my problem. None of them got the section > you are referring to. > > At the Internet, there are a site at http://www.adahome.com, > which have the RM for Ada 95, but no users guide. > > Exactly what users guide are you referring to? > > -- > Rune Wemberg > ruw@ffi.no > > Hello, I'm apparently trying to do something similar to Mr. Wemberg. I have the users guide referred to by Mr. Dewar. It does mention mixed language programming. I have another guide that came with the GNAT installation. It shows an example that doesn't appear to be correct. I also have J.G.P. Barnes Ada text, which has little information about the use of Convention, Import, or Export. I am trying to call a simple Ada procedure from a C++ program. I can compile, link/bind, etc, each item individually and they run fine. I cannot get them set up and linked together however. I have followed the procedure in the GNAT users guide without success. Any other hints that might be helpful? TIA. AE address e-mail replies to: eliasson@logan.msfc.nasa.gov ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~1997-05-15 0:00 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 1997-05-12 0:00 Using ADA procedures from C Rune Wemberg 1997-05-12 0:00 ` Michael Paus 1997-05-13 0:00 ` Robert Dewar 1997-05-14 0:00 ` Rune Wemberg 1997-05-14 0:00 ` Robert Dewar 1997-05-15 0:00 ` root
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox