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,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!not-for-mail From: ganesh.ramasivan@gdcanada.com (Ganesh Ramasivan) Newsgroups: comp.lang.ada Subject: Calling C++ methods from Ada.. Date: 1 Dec 2004 13:11:20 -0800 Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: 209.29.50.252 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1101935481 7253 127.0.0.1 (1 Dec 2004 21:11:21 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 1 Dec 2004 21:11:21 +0000 (UTC) Xref: g2news1.google.com comp.lang.ada:6700 Date: 2004-12-01T13:11:20-08:00 List-Id: The following is a small test program in which the Ada function is implemented in C++. ------------------------------ with System; procedure CppTest is procedure SET_TIME (hour: System.Address); pragma import(CPP, SET_TIME, "Time::SetTime"); begin null; end CppTest; -------------------------------- I get the following error when I compile this code using the GHS Ada compiler under Solaris 2.8. Can anybody please tell me what I am doing wrong? c8966@gatekeeper: cpp>build CppTest.bld Compiling /home/c8966/ada/cpp/CppTest.ada because "CppTest.o" doesn't exist /home/c8966/ada/cpp/CppTest.ada: Error: line 83 col 10 LRM:B.1(26), No compatible C++ type for System.Address_Target Error: build failed Build terminated Thanks, Ganesh