comp.lang.ada
 help / color / mirror / Atom feed
From: sjw <simon.j.wright@mac.com>
Subject: Re: GNAT 2008 GPL pragma import VC++
Date: Tue, 27 Jan 2009 12:28:51 -0800 (PST)
Date: 2009-01-27T12:28:51-08:00	[thread overview]
Message-ID: <d666846b-a341-4e4d-ba11-12169f86517b@b38g2000prf.googlegroups.com> (raw)
In-Reply-To: 7d667b48-d51c-41ef-9cb4-cb3b640f8824@d32g2000yqe.googlegroups.com

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).



  reply	other threads:[~2009-01-27 20:28 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 [this message]
2009-01-27 22:28   ` JJ
2009-01-27 22:39   ` JJ
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