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,8fec429719a29bf9 X-Google-Attributes: gid103376,public From: Ding-yuan Sheu Subject: Re: Interface between ADA and C++ Date: 1996/05/29 Message-ID: <31AC5878.41C6@afit.af.mil>#1/1 X-Deja-AN: 157353648 references: <31A2C469.41C6@essiris2.atlas.de> <4o4h0p$l32@hacgate2.hac.com> <1996May29.083850.24678@hrbicf> content-type: text/plain; charset=us-ascii organization: Air Force Institute of Technology mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 2.0 (X11; I; IRIX 5.3 IP20) Date: 1996-05-29T00:00:00+00:00 List-Id: Ken Slater wrote: > > I have just started using GNAT on a Silicon Graphics Indy workstation and > was also wondering how easy it was to interface to C++. Do you use pragmas? > Is there any sample code showing how this is done? Yes, you can download "c++-interface" in "ftp://ftp.cdrom.com/pub/languages/ada/compiler/gnat/distrib/docs/" This article has an example that shows how to interface a C++ class from Ada programs. I still try to interface an Ada tagged type from C++ programs but I have not successed yet. >Is it dependent on the C++ compiler used (i.e. must you use gcc)? No, you still can use the CC (SGI's C++ complier) and GNAT. However, I has to reminder you that GNAT's C++ LOW-LEVEL interface capability is defined for third party venders not for programmers. If you want to do this kind of work by youeself, I'll say it is not easy especially for large system.