From: greg@cae.ca (Greg Dickie X2955)
Subject: Re: Help - Interfacing with C using Ada 83
Date: 1996/10/11
Date: 1996-10-11T00:00:00+00:00 [thread overview]
Message-ID: <53ldsk$c96@web.cae.ca> (raw)
In-Reply-To: 325C73A2.6994@hiwaay.net
Have not done this in DOS but we do it all the time in Windows/UNIX and I
don't see any difference. Essentially you need a pragma interface in the
ADA code to define the C call. The other ActivADA compilers I've only used
with MSVC++ object files but I believe the Borland format is the same so
you just need to link the C object file in with the rest of the ADA code.
THis is a pretty straightforward operation.
Hope this helps
Tai Pan (lbfoster@hiwaay.net) wrote:
: Can somebody tell me how to get Ada 83 to call a C routine in an MS-DOS
: environment? I'm using an ActivAda compiler and Borland C++ v4.51. The C
: routine returns null terminated strings up to 255 characters. I have the
: C source so the C compiler settings can be adjusted if required.
: Portability is not an issue.
: My project engineer says it can't be done. I find this hard to believe
: but I'm new to Ada and don't have much "hands on". I'm a bit paranoid
: about playing with the Ada compiler since compiling the demo "hello
: world" with three (!) added resulted in a compiler crash that scrambled
: my primary drive (not running the program, just trying to compile it).
: Surely Ada can handle such a seemingly simple task. Any help would be
: appreciated. Thanks in advance.
--
-------------------------------------------------------------------------
Greg Dickie
Just a Guy
CAE Electronics Ltd.
Montreal, Canada
(514) 341-6780 X2955
greg@cae.ca
next prev parent reply other threads:[~1996-10-11 0:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-10-09 0:00 Help - Interfacing with C using Ada 83 Tai Pan
1996-10-11 0:00 ` Greg Dickie X2955 [this message]
1996-10-13 0:00 ` Jim Dorman
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox