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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d831f4147659ab6a,start X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!e31g2000hse.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Using GNAT project files and libraries Date: Fri, 7 Mar 2008 14:37:15 -0800 (PST) Organization: http://groups.google.com Message-ID: <571db1b9-0d10-4044-8217-81311a35c7f2@e31g2000hse.googlegroups.com> NNTP-Posting-Host: 85.3.114.244 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1204929435 1143 127.0.0.1 (7 Mar 2008 22:37:15 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 7 Mar 2008 22:37:15 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e31g2000hse.googlegroups.com; posting-host=85.3.114.244; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:20228 Date: 2008-03-07T14:37:15-08:00 List-Id: Hi, I have a library composed of two packages: the root library package, which is empty (pure), and one child containing Some_Procedure. Let's say the packages are named L and L.Child. The library is compiled and resides in the following directories: src: l.ads, l-child.ads, l-child.adb lib: l.ali, l-child.ali, libl.a There is also a sibling test directory with the following a.adb: with L.Child; procedure A is begin L.Child.Some_Procedure; end A; Now I try to figure out how to write A.gpr project file. I have the following: project A is for Source_Files use ("a.adb"); package Compiler is for Default_Switches ("Ada") use ("-I../src"); end Compiler; end A; This is enough to get the a.adb file compiled, but after that gnatmake exits with: gnatmake: "l.ads" not found I tried similar entries for Binder and Builder packages (with different combinations of -aI, -aL, -aO, etc.), but to no avail. How should I write the complete A.gpr project file so that my a.adb can use the L library? Note that the following: $ gnatmake a -I../src -L../lib -largs -ll creates a working executable, but does *not* do it the way I want - it seems to compile ../src/l-child.adb, which I guess can be avoided (the ../lib/libl.a has some purpose, after all). -- Maciej Sobczak * www.msobczak.com * www.inspirel.com