comp.lang.ada
 help / color / mirror / Atom feed
From: Szymon Guz <guzo@stud.ics.p.lodz.pl>
Subject: Re: problem with CPP_* pragmas
Date: Thu, 11 Mar 2004 22:55:40 +0100
Date: 2004-03-11T22:55:40+01:00	[thread overview]
Message-ID: <c2qnef$8vq$1@nemesis.news.tpi.pl> (raw)
In-Reply-To: <c2povu$70n$1@a1-hrz.uni-duisburg.de>

Georg Bauhaus wrote:
> Szymon Guz <guzo@stud.ics.p.lodz.pl> 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 ?



  reply	other threads:[~2004-03-11 21:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-10 22:31 problem with CPP_* pragmas Szymon Guz
2004-03-11 13:18 ` Georg Bauhaus
2004-03-11 21:55   ` Szymon Guz [this message]
2004-03-12 18:52     ` Georg Bauhaus
2004-03-12 19:22       ` Szymon Guz
2004-03-12 20:16         ` Georg Bauhaus
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox