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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b7f989b91317be82 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-25 07:53:22 PST Newsgroups: comp.lang.ada Subject: Re: GNAT equivalent for Green Hills functionality References: From: Jean-Marc Bourguet Date: 25 Apr 2002 16:53:11 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: cdssoph29.cadence.com Message-ID: <3cc81861$1@news.cadence.com> X-Trace: news.cadence.com 1019746401 cdssoph29.cadence.com (25 Apr 2002 07:53:21 -0800) Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!cpk-news-hub1.bbnplanet.com!news.gtei.net!nntp.abs.net!uunet!dca.uu.net!news.cadence.com Xref: archiver1.google.com comp.lang.ada:23107 Date: 2002-04-25T16:53:11+02:00 List-Id: michael.p.card@lmco.com (Michael P. Card) writes: [Gren Hills provided 3 C functions] > rts_task_init()- registers a C thread with Ada run-time so that after > this call Ada will see it as if it were an Ada task. This way the C code > can call Ada code that might make a protected object call, task > rendezvous etc and teh C thread will be suspended and restarted properly > just as if it were an Ada task I seem to remember that there is something similar with gnat, but I've not used it. > adainit()- kicks off all Ada elaboration, initialization etc just as > would happen at program start if Ada were the "main" > > adafinal()- finalizes all objects just as would occur at end-of-program > if Ada were the "main" These are defined in the standard, and I've used them with gnat. > Does GNAT provide similar capability for cases where C++ is the "main"? > Note that it may be that we will be using a C++ compiler other than gcc, > I have heard that Ada/C++ integration is easy with GNAT if the C++ code > is compiled with gcc. >From what I've understood, Ada/C++ integration is easy with GNAT, whatever compiler is used for C++. It comes with the interface set up for g++ but you can describe your C++ compiler. And obviously if you are interfacing with C calling convention (using only extern "C" C++ functions), then the way of doing it is standard. I suggest to contact ACT, your email address makes me doubt that you should be using GNAT without support and from what I get, the quality of their support is their main selling argument. Yours, -- Jean-Marc