From: "Steve" <nospam_steved94@attbi.com>
Subject: Re: gnat link to c++ classes (all gcc)
Date: Wed, 26 Mar 2003 02:53:43 GMT
Date: 2003-03-26T02:53:43+00:00 [thread overview]
Message-ID: <WC8ga.214697$eG2.32149@sccrnsc03> (raw)
In-Reply-To: 230320032328356719%hopperj@macconnect.com
Have you tried the GNAT User's Guide?
In Gnat 3.15p the section is:
2.11.2 Linking a Mixed C++ & Ada Program
And:
2.11.3 A Simple Example
I have dynamically linked C++ to Ada with a non-gnat compiler, but I've have
done it the hard way. I create an instance of a tagged type corresponding
to each class, and keep a copy of the "this" pointer for the class in the
tagged type. On the "C++" side I have extern C functions that are called
from the Ada side and cast the "this" pointer to the appropriate type to
invoke the method.
If anyone wants I could put together a small example.
Steve
(The Duck)
"jim hopper" <hopperj@macconnect.com> wrote in message
news:230320032328356719%hopperj@macconnect.com...
> can anyone point me at some examples of how to interfaces an ada tagged
> type to a c++ class? there seem to be several pragmas inside gnat that
> seem setup to do this but no examples at all of how to use that that i
> have found.
>
> thanks jim
prev parent reply other threads:[~2003-03-26 2:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-24 4:37 gnat link to c++ classes (all gcc) jim hopper
2003-03-26 2:53 ` Steve [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox