From: julian_robbins@bigfoot.com (Julian Robbins)
Subject: Re: Calling Ada from C++ (MS Visual C++)
Date: 11 Apr 2002 01:51:02 -0700
Date: 2002-04-11T08:51:03+00:00 [thread overview]
Message-ID: <3ab585c8.0204110051.3659218c@posting.google.com> (raw)
In-Reply-To: u1yduhuw5.fsf@gsfc.nasa.gov
Okay, so here is what I have done...
Compiled the original "mathutil.adb" into "mathutil.o". Then used
"gnatbind -n mathutil" which produced the files "b~mathutil.adb" and
".ads". I then compiled these using gcc and renamed the resulting .o
file "main.o".
Within my VC++ project I have then included the mathutil.o and main.o
files, added calls to adainit() and adafinal() and then
compiled/linked. This throws up various missing links, so I have
included the following library files:
libgnat.a
libgcc.a
libmingw32.a
Does this seem correct?? It seems to compile and run, but I can't help
thinking that this process seems a bit odd.
Cheers,
Julian
Stephen Leake <stephen.a.leake.1@gsfc.nasa.gov> wrote in message news:<u1yduhuw5.fsf@gsfc.nasa.gov>...
> julian_robbins@bigfoot.com (Julian Robbins) writes:
>
> > So, using GNAT I believe that I can include the 'adainit()' and
> > 'adafinal()' in the binding stage using 'gnatbind -n mathutil.ali'.
> > However, this seems to produce a .o file that I could then only use
> > with gnatlink to link the C++ objects and Ada objects together. This I
> > can not do - I need to use MS Visual Studio to link the final
> > executable, including any relevant Ada objects.
>
> You can link the .o file containing adafinal() and adainit() with your
> C++ code, same as any other Ada .o.
next prev parent reply other threads:[~2002-04-11 8:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-05 8:30 Calling Ada from C++ (MS Visual C++) Julian Robbins
2002-04-05 18:18 ` Stephen Leake
2002-04-11 8:51 ` Julian Robbins [this message]
2002-04-11 17:15 ` Stephen Leake
2002-04-16 12:27 ` Karel Miklav
2002-04-16 14:07 ` Stephen Leake
-- strict thread matches above, loose matches on Subject: below --
2002-04-05 10:26 Caldwell Ian
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox