From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: combine Ada with MS VS C++
Date: Wed, 16 Mar 2005 16:18:40 -0600
Date: 2005-03-16T16:18:40-06:00 [thread overview]
Message-ID: <4smdnRkGBLevLaXfRVn-rw@megapath.net> (raw)
In-Reply-To: 87hdjb5kqd.fsf@insalien.org
"Ludovic Brenta" <ludovic.brenta@insalien.org> wrote in message
news:87hdjb5kqd.fsf@insalien.org...
> writes:
...
> I don't program on Windows, so I can't help you with the exporting
> from Ada. You may need to use all three arguments to pragma Export in
> order to get the link name right; this is the platform-dependent part.
> So you'd say something like:
>
> procedure Check_Buffer (vr, vl : in out Interfaces.C.double);
> pragma Export (Convention => C, Entity => Check_Buffer,
> External_Name => "CheckBuffer", -- this is...
> Link_Name => "something"); -- ...the hard part
I'd leave out the link name part. The intent is that you specify *either*
the link name *or* the external name. The external name is the name as it
appears in C. I think all Windows Ada compilers can generate the link name
from that name; certainly we only used the External_Name in Claw to link to
Win32.
This only works if you turn off name-mangling as suggested in the previous
response. You could use the link name instead to manually provide the
mangled name, but that seems like a lot of work for little gain.
Randy.
next prev parent reply other threads:[~2005-03-16 22:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-16 13:04 combine Ada with MS VS C++ ich_bin_elvis
2005-03-16 14:18 ` Larry Kilgallen
2005-03-16 14:53 ` ich_bin_elvis
2005-03-16 16:42 ` Martin Krischik
2005-04-12 10:18 ` ich_bin_elvis
2005-04-12 14:38 ` ich_bin_elvis
2005-03-16 21:44 ` Ludovic Brenta
2005-03-16 22:18 ` Randy Brukardt [this message]
2005-03-17 3:32 ` David Botton
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox