From: "Jeffrey R. Carter" <spam.not.jrcarter@acm.not.spam.org>
Subject: Re: GPS example fails to compile
Date: Thu, 22 Jun 2006 05:00:09 GMT
Date: 2006-06-22T05:00:09+00:00 [thread overview]
Message-ID: <ttpmg.41164$1i1.20706@attbi_s72> (raw)
In-Reply-To: <ab29599196bb2f30761a00d3366d9425@localhost.talkaboutprogramming.com>
Xcriber51 wrote:
>
> Any patient soul out there to explain how the f--- Ada does binding with
> an external language module? (Not the "pragma import" construct, dammit,
> but how the whole thing comes together.)
When you import a subprogram from another language, you're going outside
the Ada language, so the compiler can't help you. You've entered the
realm of unchecked programming, where you're telling the compiler,
"Trust me." (Of course, decades of experience with languages like C show
that, for anything significant, we can't be trusted.)
At link time, you have to provide the linker with the implementation of
the imported operation so your program can call it. Ada provides pragma
Linker_Options for that. With gnatmake, you can use -largs to provide
linker options, or use the project-file mechanism.
--
Jeff Carter
"To Err is human, to really screw up, you need C++!"
St�phane Richard
63
next prev parent reply other threads:[~2006-06-22 5:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-21 20:43 GPS example fails to compile Xcriber51
2006-06-21 20:56 ` Pascal Obry
2006-06-21 21:16 ` Xcriber51
2006-06-21 21:12 ` Gautier
2006-06-22 5:00 ` Jeffrey R. Carter [this message]
2006-06-22 11:29 ` Stephen Leake
2006-06-22 22:41 ` Simon Wright
2006-06-23 8:18 ` Ludovic Brenta
2006-06-23 12:59 ` Alex R. Mosteo
2006-06-23 19:35 ` Xcriber51
2006-06-25 20:41 ` Simon Wright
2006-06-26 6:58 ` Alex R. Mosteo
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox