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: a07f3367d7,b2c4d98cbc17f0a9 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Path: g2news2.google.com!news3.google.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!.POSTED!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: A proposal for Debian policy for Ada Date: Sun, 16 May 2010 22:48:19 +0200 Organization: A noiseless patient Spider Message-ID: <87aarzd14c.fsf@ludovic-brenta.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Sun, 16 May 2010 20:48:19 +0000 (UTC) Injection-Info: mx03.eternal-september.org; posting-host="nHQ58sdsUWLzBSs89yL2wQ"; logging-data="22647"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+JJH/3OylRp6Q+nFiGKdkj" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:JXWEGRGd9uPjyYzLDwb0u9l0NSs= sha1:6YdYPwBOEcnj8l+oTDj6BbqTcyI= Xref: g2news2.google.com comp.lang.ada:11665 Date: 2010-05-16T22:48:19+02:00 List-Id: "Dmitry A. Kazakov" writes: > In the past we are used to link external libraries using package Linker and > Default_Switches ("ada") set to, e.g. "-lgdk_pixbuf-2.0". The problem with > this approach is that Linker package is not automatically inherited. There > exist different workarounds all more or less unpleasant. > > Meanwhile there is IMO a cleaner and simpler way. Just create a gpr file > for the library(es) in use. For example: > > project Gdk_Pixbuf is > for Externally_Built use "true"; > for Source_Files use (); > for Library_Dir use "/usr/lib"; -- Where it resides > for Library_Name use "gdk_pixbuf-2.0"; -- Its name (no ".so" ending) > for Library_Kind use "dynamic"; -- Shared in this case > end Gdk_Pixbuf; > > Then with it in your project: > > with "gdk_pixbuf.gpr"; > project My_Library is > ... -- No linker package needed > end My_Library; > > That is. gnatmake and gprbuild will add necessary linker options to all > projects referencing My_Library. > > What about adding this as a requirement to the Debian policy? It seems you forgot to read §5.3.6 GNAT project file and §6 Using shared libraries. -- Ludovic Brenta.