From: Maciej Sobczak <see.my.homepage@gmail.com>
Subject: Using GNAT project files and libraries
Date: Fri, 7 Mar 2008 14:37:15 -0800 (PST)
Date: 2008-03-07T14:37:15-08:00 [thread overview]
Message-ID: <571db1b9-0d10-4044-8217-81311a35c7f2@e31g2000hse.googlegroups.com> (raw)
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
next reply other threads:[~2008-03-07 22:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-07 22:37 Maciej Sobczak [this message]
2008-03-08 11:59 ` Using GNAT project files and libraries Tero Koskinen
2008-03-08 17:33 ` Simon Wright
2008-03-08 20:46 ` Maciej Sobczak
2008-03-08 22:17 ` Simon Wright
2008-03-09 13:15 ` Maciej Sobczak
2008-03-09 19:03 ` 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