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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!mx05.eternal-september.org!.POSTED.host86-130-226-155.range86-130.btcentralplus.com!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Thick bindings to a C library and gnattest: suggestions? Date: Mon, 01 Jul 2013 13:47:03 +0100 Organization: A noiseless patient Spider Message-ID: References: <1fxsf70zl2ckq.aysy7d9c8jkl$.dlg@40tude.net> <40bf5a31-b09a-4106-a57a-7ac3dd5f951e@googlegroups.com> <5m9o5ouj1e2i.1h3w3i0aa3938$.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx05.eternal-september.org; posting-host="host86-130-226-155.range86-130.btcentralplus.com:86.130.226.155"; logging-data="7867"; mail-complaints-to="abuse@eternal-september.org"; posting-account="simon.j.wright" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) Cancel-Lock: sha1:CRFgR1s/zu+q3A5Q4p7jU2t2lwg= Xref: news.eternal-september.org comp.lang.ada:16011 Date: 2013-07-01T13:47:03+01:00 List-Id: "Dmitry A. Kazakov" writes: > There are other options, but they are incredibly intrusive, especially > when your bindings are themselves a library. Linker options are > ignored for library projects. They are not "transitive". I.e. each > client project will need to specify ever changing linker switches. In TASH[1], the GPR has for Library_Name use "tash"; for Library_Kind use "static"; for Library_Dir use "../../lib/tash/lib-static"; for Source_Dirs use ("../../include/tash"); for Externally_Built use "true"; package Linker is for Linker_Options use Tash_Options.Linker_Options; end Linker; where tash_options.gpr is generated in the configure stage for the library; here it contains Linker_Options := ( "-L/usr/lib", "-ltk8.5", "-ltcl8.5" ); and to use it I just 'with "tash";' in my own GPR, and the linker options get applied as you would hope. [1] https://sourceforge.net/projects/tcladashell/