comp.lang.ada
 help / color / mirror / Atom feed
From: JJ <jayson.prichard@ngc.com>
Subject: Re: GNAT 2008 GPL pragma import VC++
Date: Tue, 27 Jan 2009 14:39:19 -0800 (PST)
Date: 2009-01-27T14:39:19-08:00	[thread overview]
Message-ID: <c7634879-34b6-40ca-86c4-fed7904086b5@j35g2000yqh.googlegroups.com> (raw)
In-Reply-To: d666846b-a341-4e4d-ba11-12169f86517b@b38g2000prf.googlegroups.com

On Jan 27, 3:28 pm, sjw <simon.j.wri...@mac.com> wrote:
> On Jan 27, 7:30 pm, JJ <jayson.prich...@ngc.com> wrote:
>
> > I have an Ada program that has a pragma import to a Visual C++
> > procedure.  I have tried several combination's of External_Name (all
> > uppercase, all lowercase, mixed...) to no avail.  I continue to get an
> > "undefined reference" error during the link.
>
> > Anyone have any experience with this?
>
> No experience with VC++; but you might be having problems with name
> mangling? (ie, the c++ compiler decorates the object name of the
> function with inscrutable encoding of the parameter/result profile,
> thus supporting overloading and possibly other features).
>
> You might try
> extern "C" {
> int foo(int *bar);
>
> }
>
> which (in GCC at any rate) will generate the symbol foo (or _foo, but
> at any rate something easier to manage).

One other thought... I am using GPS (Gnat Programming Studio) as my
IDE.  Right now I am using the -Idir_to_the_obj_file switch.  This
points to the VC++ object file created.  Is there something else that
I need in the build process?



  parent reply	other threads:[~2009-01-27 22:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-27 19:30 GNAT 2008 GPL pragma import VC++ JJ
2009-01-27 20:28 ` sjw
2009-01-27 22:28   ` JJ
2009-01-27 22:39   ` JJ [this message]
2009-01-27 21:12 ` Per Sandberg
2009-01-27 22:48 ` Manuel Gomez
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox