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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,541858b4f9b6c9f9 X-Google-Attributes: gid103376,public From: dweller@dfw.net (David Weller) Subject: Re: Calling GNAT Ada 95 from C Date: 1996/04/10 Message-ID: <4kg7io$i4h@dfw.dfw.net>#1/1 X-Deja-AN: 147291303 references: <316ACAF2.5488@ix.netcom.com> organization: DFWNet -- Public Internet Access newsgroups: comp.lang.ada Date: 1996-04-10T00:00:00+00:00 List-Id: In article <316ACAF2.5488@ix.netcom.com>, Vance Christiaanse wrote: >I got an undefined symbol, "__priority_main" I think it was. > >Is it possible with GNAT for a C main to call Ada code that >includes a task? If so, could someone please tell me how to >do it? Thanks in advance. I tried several things but could >not get it to work. > Hmm, seems I've seen this problem before... :-) In your C code, you need to add this little routine: int __main_priority () { return -1; } I think this is being fixed in the next GNAT release, but Robert Dewar told me nobody had discovered it before because nobody had yet tried to call an Ada task from a C program. I had asked Robert about this a week ago, and he gave me a very prompt reply (with the code above included :-)