comp.lang.ada
 help / color / mirror / Atom feed
From: Martin Krischik <krischik@users.sourceforge.net>
Subject: Re: packages
Date: Thu, 21 Dec 2006 10:01:51 +0100
Date: 2006-12-21T10:01:51+01:00	[thread overview]
Message-ID: <458a4d7f$1@news.post.ch> (raw)
In-Reply-To: <mailman.4.1166651673.18371.comp.lang.ada@ada-france.org>

Bj�rn Lundin schrieb:
> 
> 20 dec 2006 kl. 22.11 skrev markww:
> 
>> Hi,
>>
>> I wrote a package to be included with my main program, my directory
>> looks like:
>>
>>      generic_list.ads  // package def
>>      generic_list.adb  // package body
>>      AdaGenericLinkedList.adb // my main program
>>
>> Now I need all three to be present in the same directory to compile the
>> main adb file with gnat make.
> 
> gnatmake compiles AND builds for you
> 
> try moving generic_list.adb and then _compile_ AdaGenericLinked_List.adb
> 
> gcc -c AdaGenericLinked_List.adb
> 
> You should get an object file of that. But to link, you need the 
> generic_list.adb too

Or alternativly the .o and .ali file created from generic_list. In case 
you don't want to distribute then .ads/.adb file.

In short you need one of those to link:

1) .adb & .ads
2) .o & .ali
3) .lib & .ali
4) .dll/.so  & .ali

In C++ speak: the .ali files are kind of "precompiled header files". 
Also Note: This is the way GNAT implement the an Ada-Library-Manager. 
Other compiler might use different techniques.

Martin



  parent reply	other threads:[~2006-12-21  9:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-20 21:11 packages markww
     [not found] ` <mailman.4.1166651673.18371.comp.lang.ada@ada-france.org>
2006-12-20 22:03   ` packages markww
2006-12-21  9:04     ` packages Martin Krischik
2006-12-22  9:44       ` inline expansion Stephen Leake
2006-12-22 10:57         ` Markus E Leypold
2006-12-25 13:53           ` Hyman Rosen
2006-12-21  9:04     ` packages Martin Krischik
2006-12-21  9:01   ` Martin Krischik [this message]
2006-12-23 10:10     ` packages Simon Wright
replies disabled

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