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,4dcb75e86b22b9a6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-03 11:05:22 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Interfacing ADA to C++ classes with parameters Date: 03 Apr 2002 14:01:02 -0500 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1017860782 7895 128.183.220.71 (3 Apr 2002 19:06:22 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 3 Apr 2002 19:06:22 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:22065 Date: 2002-04-03T19:06:22+00:00 List-Id: "John Haddon" writes: > Dear All, > > I'm having a problem writing an interface to a C++ class in which I want to > pass a parameter in addition to the object. Interfacing directly to C++ is _not_ defined for Ada. You can make it work, as you have discovered. However, a better approach is to export functions from C++ using "extern C", and then import them to Ada using "Import (C, ...)". -- -- Stephe