comp.lang.ada
 help / color / mirror / Atom feed
* problem with CPP_* pragmas
@ 2004-03-10 22:31 Szymon Guz
  2004-03-11 13:18 ` Georg Bauhaus
  0 siblings, 1 reply; 6+ messages in thread
From: Szymon Guz @ 2004-03-10 22:31 UTC (permalink / raw)


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



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-03-12 20:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2004-03-12 18:52     ` Georg Bauhaus
2004-03-12 19:22       ` Szymon Guz
2004-03-12 20:16         ` Georg Bauhaus

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