From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e8164763d1f73294 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wn14feed!worldnet.att.net!164.128.36.58!news.ip-plus.net!newsfeed.ip-plus.net!news.post.ch!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: packages Date: Thu, 21 Dec 2006 10:01:51 +0100 Organization: Swisscom IP+ (post doesn't reflect views of Swisscom) Message-ID: <458a4d7f$1@news.post.ch> References: <1166649100.107626.64210@48g2000cwx.googlegroups.com> NNTP-Posting-Host: 194.41.146.1 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: atlas.ip-plus.net 1166691714 25453 194.41.146.1 (21 Dec 2006 09:01:54 GMT) X-Complaints-To: abuse@ip-plus.net NNTP-Posting-Date: Thu, 21 Dec 2006 09:01:54 +0000 (UTC) User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) In-Reply-To: X-Original-NNTP-Posting-Host: w01iwt.pnet.ch X-Original-Trace: 21 Dec 2006 10:01:51 +0200, w01iwt.pnet.ch Xref: g2news2.google.com comp.lang.ada:7967 Date: 2006-12-21T10:01:51+01:00 List-Id: 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