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-Thread: 103376,5f4679d58bde270f X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit From: Brian May Newsgroups: comp.lang.ada Subject: Re: Calling C++ methods from Ada.. References: Date: Thu, 02 Dec 2004 15:36:55 +1100 Message-ID: User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:NzpFB2/gf4HbV5NsSNwCVusQdMM= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: snoopy.microcomaustralia.com.au X-Trace: news.melbourne.pipenetworks.com 1101962192 202.173.153.89 (2 Dec 2004 14:36:32 +1000) X-Complaints-To: abuse@pipenetworks.com X-Abuse-Info: Please forward all headers to enable your complaint to be properly processed. Path: g2news1.google.com!news4.google.com!news.glorb.com!newsfeed-east.nntpserver.com!nntpserver.com!news1.optus.net.au!optus!news.mel.connect.com.au!news-north.connect.com.au!duster.adelaide.on.net!news.melbourne.pipenetworks.com!not-for-mail Xref: g2news1.google.com comp.lang.ada:6708 Date: 2004-12-02T15:36:55+11:00 List-Id: >>>>> "Ganesh" == Ganesh Ramasivan writes: Ganesh> procedure CppTest is Ganesh> procedure SET_TIME (hour: System.Address); pragma Ganesh> import(CPP, SET_TIME, "Time::SetTime"); Ganesh> begin null; end CppTest; Is Time::SetTime a static member function? You didn't give the definition in your E-Mail so I can't tell.. If it isn't, then it is a class method, and requires a hidden *this parameter. Furthermore, if it is a virtual function, then a static binding may not be appropriate. Check the GNAT reference manual for details on the following pragmas (section 10.2 Interfacing to C++): pragma CPP_Class pragma CPP_Constructor pragma CPP_Vtable Note I haven't used any of these, don't understand (yet) how to use them, and I don't know of any examples (do a web search). -- Brian May