comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Creem <jeff@thecreems.com>
Subject: Re: Ada to Ada Pragma Export/Import
Date: Wed, 09 Aug 2006 19:26:54 -0400
Date: 2006-08-09T19:26:54-04:00	[thread overview]
Message-ID: <ei7qq3-8o5.ln1@newserver.thecreems.com> (raw)
In-Reply-To: <1155161131.024343.273760@b28g2000cwb.googlegroups.com>

AskeyAJ@gmail.com wrote:
> I need to deliver object files (coded in Ada) to another team who will
> access the public routines in their Ada code.  I cannot deliver the
> package bodies (but can deliver the object files, the specs, and the
> ALI files).  For example, suppose I want do deliver the hello_pkg.o and
> hello_pkg.ads from the code below.
> 
> My assumption is that I need to export the Say_It procedure in the
> spec, and then the other team would need to import this procedure into
> their code.  Is this correct?  And what is the syntax required?  I've
> tried the following but can't figure it out.
> 


The problem with this approach is that the elaboration code will not get 
called correctly.

What you are doing is complicated enough (and clearly not open source) 
that I would think  you would want/have a support contract from AdaCore. 
They would be good people to ask.

Having said that, take a look at

http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gnat_ugn_unw/Stand_002dalone-Ada-Libraries.html#Stand_002dalone-Ada-Libraries

I've not done the exact thing you are doing, nor have I ever done what 
is described on that page but I have created a windows dll and provided 
an interface to it for use through C using related methods.

I'd recommend that you deliver the library file and the spec files that 
are designed to link against that library.

You will not (I think) be able to provide generics to the other team. 
That is not the same thing as saying that you can't program using 
generics. Just that you will have to provide (in the library) 
instantiations of any generic packages for them.



  reply	other threads:[~2006-08-09 23:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-09 22:05 Ada to Ada Pragma Export/Import AskeyAJ
2006-08-09 23:26 ` Jeffrey Creem [this message]
2006-08-09 23:48 ` Georg Bauhaus
2006-08-10 12:00 ` Stephen Leake
2006-08-10 13:06 ` gautier_niouzes
2006-08-10 16:49 ` Martin Krischik
2006-08-11 14:02   ` AskeyAJ
2006-08-11 14:22     ` Ludovic Brenta
2006-08-11 16:55       ` AskeyAJ
2006-08-11 16:35     ` Martin Krischik
2006-08-11 16:58       ` AskeyAJ
replies disabled

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