comp.lang.ada
 help / color / mirror / Atom feed
From: Gene Ouye <geneo@rational.please_no_unsolicited_mail.com>
Subject: Re: Ada to C++ communication under NT4.0
Date: 1998/08/21
Date: 1998-08-21T00:00:00+00:00	[thread overview]
Message-ID: <35DE3504.73D42417@rational.please_no_unsolicited_mail.com> (raw)
In-Reply-To: 35D2DA1B.64D7@erols.com

FYI, Rational Apex Ada NT also uses the MS object file format and can
link with MSVC++ code.  However, as you mention below, DLLs are another
way to make multi-language applications in Windows.  I have found most
people find it simpler to create Ada DLLs (which you can do with Apex)
which can then called by any language you choose.

Gene Ouye <g.e.n.e.o.@.r.a.t.i.o.n.a.l...c.o.m>


Stephen Leake wrote:
 [...]
> There are two issues in combining C++ and Ada into a single executable:
> object file format and elaboration/finalization.
> 
> The current fully supported version of the GNAT compiler (3.11?)
> supports the Microsoft object format, so it can link C++ compiled with
> MS C++ with Ada compiled by GNAT. The current public version of GNAT
> (3.10) can't do this. However, ObjectAda from Aonix uses the MS object
> file format for Ada code; it can link with MS C++. Note that Borland
> uses a different object file format, and can't link with any of these.
> 
> Another way around the object file format problem is to make DLLs. In my
> current application, I use ObjectAda to make a DLL, and call it from
> Borland C++. GNAT can also make DLLs.
> 
> The elaboration/finalization problem is solved by explicitly calling the
> elaboration and finalization code that is normally called by "main". In
> general, you can have either an Ada main that explicitly calls the C++
> stuff, or a C++ main that explicitly calls the Ada stuff. The GNAT
> user's guide has good instructions on how to call the GNAT
> elaboration/finalization code.
> 
> Multi-language programming is the best way to introduce people to Ada!
> 
> -- Stephe




      reply	other threads:[~1998-08-21  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <01bdc0c8$e8a76a80$0f010180@nc84c>
1998-08-05  0:00 ` Ada to C++ communication under NT4.0 vonhend
1998-08-10  0:00   ` Mark
1998-08-10  0:00     ` Steve Doiel
1998-08-13  0:00     ` Stephen Leake
1998-08-21  0:00       ` Gene Ouye [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