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,e0e945d31e5bac78,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-03-10 14:32:08 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!feed.news.tiscali.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail From: Szymon Guz Newsgroups: comp.lang.ada Subject: problem with CPP_* pragmas Date: Wed, 10 Mar 2004 23:31:54 +0100 Organization: tp.internet - http://www.tpi.pl/ Message-ID: NNTP-Posting-Host: hal.skynet.org.pl Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: atlantis.news.tpi.pl 1078957945 17488 195.116.185.50 (10 Mar 2004 22:32:25 GMT) X-Complaints-To: usenet@tpi.pl NNTP-Posting-Date: Wed, 10 Mar 2004 22:32:25 +0000 (UTC) User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) X-Accept-Language: en-us, en Xref: archiver1.google.com comp.lang.ada:6221 Date: 2004-03-10T23:31:54+01:00 List-Id: Hi, I keep on trying to create an Ada binding to a C++ dll library. Now I try to solve a small problem with the CPP_* pragmas so I wrote some small dll library in C++ and try to make the Ada binding, but I cannot do one thing. I wrote sth like this: ******************************************************************** 1. with Win32; 2. with Interfaces.CPP; 3. 4. package TestClass is 5. 6. 7. type CA is tagged 8. record 9. VTable : Interfaces.CPP.Vtable_Ptr; 10. m1 : Win32.INT; 11. d2 : Win32.DOUBLE; 12. end record; 13. type CA_Ptr is access all CA'Class; 14. function Create return CA; 15. 16. pragma CPP_Vtable( 17. Entity => CA, 18. VTable_Ptr => VTable, 19. Entry_Count => 5); 20. pragma CPP_Class(Entity => CA); 21. pragma CPP_Constructor(Create); 22. ******************************************************************** My problem is that I still get a compiler error like this: on line 17: CPP_Class tagged type expected on line 21: pragma "Cpp_Constructor" requires function returning a CPP_Class type Could someone tell me what i wrong here, please ? Szymon Guz