comp.lang.ada
 help / color / mirror / Atom feed
From: "markww" <markww@gmail.com>
Subject: Re: packages
Date: 20 Dec 2006 14:03:37 -0800
Date: 2006-12-20T14:03:37-08:00	[thread overview]
Message-ID: <1166652217.037740.272730@t46g2000cwa.googlegroups.com> (raw)
In-Reply-To: <mailman.4.1166651673.18371.comp.lang.ada@ada-france.org>


Björn Lundin wrote:
> 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
>
>
>
> /Björn
>
> Björn Lundin
> b dot f dot lundin at gmail dot com
>
>
>
>
> --Apple-Mail-1--634177642
> Content-Type: text/html; charset=ISO-8859-1
> Content-Transfer-Encoding: quoted-printable
> X-Google-AttachSize: 3765
>
> <HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>20 dec 2006 kl. 22.11 skrev markww:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Hi,</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I wrote a package to be included with my main program, my directory</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">looks like:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-converted-space">     </SPAN>generic_list.ads<SPAN class="Apple-converted-space">  </SPAN>// package def</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-converted-space">     </SPAN>generic_list.adb<SPAN class="Apple-converted-space">  </SPAN>// package body</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-converted-space">     </SPAN>AdaGenericLinkedList.adb // my main program</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Now I need all three to be present in the same directory to compile the</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">main adb file with gnat make. <BR></DIV></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>gnatmake compiles AND builds for you</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>try moving generic_list.adb and then _compile_ AdaGenericLinked_List.adb</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>gcc -c AdaGenericLinked_List.adb</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>You should get an object file of that. But to link, you need the generic_list.adb too</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV></DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">/Björn</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><BR class="khtml-block-placeholder"></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Björn Lundin</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">b dot f dot lundin at gmail dot com</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></BODY></HTML>
> --Apple-Mail-1--634177642--

Ohh I see so you can compile with only the package *specification* but
in order to finalize by linking then you do need the pacakage body?

Thanks




  parent reply	other threads:[~2006-12-20 22:03 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   ` markww [this message]
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   ` packages Martin Krischik
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