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,75d212d235385766 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-03-25 18:53:44 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!yellow.newsread.com!netaxs.com!newsread.com!news-east.rr.com!wn12feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!sccrnsc03.POSTED!not-for-mail From: "Steve" Newsgroups: comp.lang.ada References: <230320032328356719%hopperj@macconnect.com> Subject: Re: gnat link to c++ classes (all gcc) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: NNTP-Posting-Host: 12.211.13.75 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc03 1048647222 12.211.13.75 (Wed, 26 Mar 2003 02:53:42 GMT) NNTP-Posting-Date: Wed, 26 Mar 2003 02:53:42 GMT Organization: AT&T Broadband Date: Wed, 26 Mar 2003 02:53:43 GMT Xref: archiver1.google.com comp.lang.ada:35706 Date: 2003-03-26T02:53:43+00:00 List-Id: Have you tried the GNAT User's Guide? In Gnat 3.15p the section is: 2.11.2 Linking a Mixed C++ & Ada Program And: 2.11.3 A Simple Example I have dynamically linked C++ to Ada with a non-gnat compiler, but I've have done it the hard way. I create an instance of a tagged type corresponding to each class, and keep a copy of the "this" pointer for the class in the tagged type. On the "C++" side I have extern C functions that are called from the Ada side and cast the "this" pointer to the appropriate type to invoke the method. If anyone wants I could put together a small example. Steve (The Duck) "jim hopper" wrote in message news:230320032328356719%hopperj@macconnect.com... > can anyone point me at some examples of how to interfaces an ada tagged > type to a c++ class? there seem to be several pragmas inside gnat that > seem setup to do this but no examples at all of how to use that that i > have found. > > thanks jim