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 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-03-11 13:56:41 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.wirehub.nl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail From: Szymon Guz Newsgroups: comp.lang.ada Subject: Re: problem with CPP_* pragmas Date: Thu, 11 Mar 2004 22:55:40 +0100 Organization: tp.internet - http://www.tpi.pl/ Message-ID: References: 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: nemesis.news.tpi.pl 1079042319 9210 195.116.185.50 (11 Mar 2004 21:58:39 GMT) X-Complaints-To: usenet@tpi.pl NNTP-Posting-Date: Thu, 11 Mar 2004 21:58:39 +0000 (UTC) User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) X-Accept-Language: en-us, en In-Reply-To: Xref: archiver1.google.com comp.lang.ada:6252 Date: 2004-03-11T22:55:40+01:00 List-Id: Georg Bauhaus wrote: > Szymon Guz wrote: > This compiles (not tried on Windows(TM) though): > > One change ist moving Create down so that CA is known to be > a CPP_Class type when Create is declared. "return CA'Class" > is what my GNAT RM says is required. > > > -- Georg Thanks, that helped me a lot, but I still have a problem. There is a virtual function in C++: virtual void CA::Met1(int par1, double par2); I wrote in Ada sth like this: procedure Met1 ( this : CA_Ptr; par1 : Win32.INT; par2 : Win32.DOUBLE ); now I try to import the function from dll to be a virtual function, so I wrote: pragma CPP_Virtual ( Entity => Met1, VTable_Ptr => VTable, Position = 1); My problem is that I still get the same error: testclass.ads:36:21: pragma "Cpp_Virtual" must reference a primitive operation What do I do wrong ?