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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Xref: utzoo comp.lang.ada:4861 comp.lang.c:36249 Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!igor!yoda!jls From: jls@yoda.Rational.COM (Jim Showalter) Newsgroups: comp.lang.ada,comp.lang.c Subject: Re: Calling Ada routines from C programs. Message-ID: Date: 18 Feb 91 00:23:37 GMT References: <1884@array.UUCP> Sender: news@Rational.COM Followup-To: comp.lang.ada List-Id: mark@array.UUCP (Mark Culp) writes: I believe you are trying to do this backwards. Pragma Interface allows Ada to call other languages. I do not believe the LRM specifies how OTHER languages are to call Ada--that would seem to be more the job of the linker for the other language than of Ada. Thus, in your example you have written the Ada Test_C_Interface to be able to call a C function called "C_Main_Routine". This should work (presuming you have tools sufficient to link the two languages). But then you try to call ada_routine from your C program. Does your C linker know how to do this? If not, this won't work. -- ***** DISCLAIMER: The opinions expressed herein are my own. Duh. Like you'd ever be able to find a company (or, for that matter, very many people) with opinions like mine. -- "When I want your opinion, I'll beat it out of you."