From: Szymon Guz <guzo@stud.ics.p.lodz.pl>
Subject: problem with CPP_* pragmas
Date: Wed, 10 Mar 2004 23:31:54 +0100
Date: 2004-03-10T23:31:54+01:00 [thread overview]
Message-ID: <c2o51n$h2g$1@atlantis.news.tpi.pl> (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
next reply other threads:[~2004-03-10 22:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-10 22:31 Szymon Guz [this message]
2004-03-11 13:18 ` problem with CPP_* pragmas 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
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox