comp.lang.ada
 help / color / mirror / Atom feed
From: Ashley King <ashleyking@my-deja.com>
Subject: Re: Calling C from Ada - link problem
Date: 2000/03/10
Date: 2000-03-10T00:00:00+00:00	[thread overview]
Message-ID: <8aao8n$94m$1@nnrp1.deja.com> (raw)
In-Reply-To: 38C7E615.A011C7FE@averstar.com

In article <38C7E615.A011C7FE@averstar.com>,
  Tucker Taft <stt@averstar.com> wrote:
> ObjectAda has a number of conventions other than simply "C" which
> allow you to be more specific about the calling convention and/or
> specify whether you are exporting/importing as part of a DLL.
> You might want to consult that part of the ObjectAda documentation
> that explains the options available for the "convention" argument to
> pragma Import.
Thanks, I did. I tried putting DLL in place of C in the import command,
and that made no difference.

Another attempt: I created a new c++ project where I said I wanted to
have a static library rather than a DLL, and removed the dllexport bit
from the C code. It linked in the static library successfully, but
complained that it couldn't find some other library. After putting the
path to that library in the project settings, I now get the same
lnk1136 error but this time on a Microsoft Visual Studio vc98 library
called mapi.lib. I again tried copying the files that Rush Kester had
suggested, and got the same result as before.

I even tried making the function a procedure and the return type of the
C code void. No change.

Perhaps the versions of ObjectAda and Visual C++ that I am using are
incompatible in some way. Robert Dewar said that he had built
successfully on his setup, so it's possible that specifying C rather
than DLL makes no real difference in this example and I have just
missed something from the Ada project settings.

Regards,
Ashley

--
Email won't work. Read here, post here.


Sent via Deja.com http://www.deja.com/
Before you buy.




  reply	other threads:[~2000-03-10  0:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-09  0:00 Calling C from Ada - link problem Ashley King
2000-03-09  0:00 ` Rush Kester
2000-03-10  0:00   ` Ashley King
2000-03-09  0:00 ` Tucker Taft
2000-03-10  0:00   ` Ashley King [this message]
2000-03-09  0:00 ` Robert Dewar
2000-03-09  0:00   ` Larry Kilgallen
2000-03-09  0:00 ` Mike Dimmick
2000-03-10  0:00   ` Ashley King
2000-03-11  0:00     ` 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