From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 1014db,9a2aaa729f5fbd16 X-Google-Thread: 103376,9a2aaa729f5fbd16 X-Google-Attributes: gid1014db,gid103376,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!e23g2000prf.googlegroups.com!not-for-mail From: Jerry Newsgroups: comp.lang.c, comp.lang.ada Subject: Re: C and ADA Date: Wed, 2 Jan 2008 23:38:09 -0800 (PST) Organization: http://groups.google.com Message-ID: <17fdc875-668b-4e9f-948c-9bb2898cf47c@e23g2000prf.googlegroups.com> References: NNTP-Posting-Host: 75.171.118.172 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1199345889 19645 127.0.0.1 (3 Jan 2008 07:38:09 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 3 Jan 2008 07:38:09 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e23g2000prf.googlegroups.com; posting-host=75.171.118.172; posting-account=x5rpZwoAAABMN2XPwcebPWPkebpwQNJG User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/523.12.2 (KHTML, like Gecko) Version/3.0.4 Safari/523.12.2,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.c:154179 comp.lang.ada:19168 Date: 2008-01-02T23:38:09-08:00 List-Id: On Jan 2, 3:33=A0pm, Brian 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. This process is described here (as well as the opposite process where the main program is Ada); http://gcc.gnu.org/onlinedocs/gnat_ugn_unw/Interfacing-to-C.html#Interfacing= -to-C Also, see the Ada Reference Manual: http://www.adaic.com/standards/05rm/html/RM-B-3.html FWIW, I've done this sort of thing using GPC, the GNU Pascal compiler, with good results. Jerry