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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.224.129.196 with SMTP id p4mr26114656qas.6.1372680050886; Mon, 01 Jul 2013 05:00:50 -0700 (PDT) X-Received: by 10.49.17.42 with SMTP id l10mr651362qed.10.1372680050872; Mon, 01 Jul 2013 05:00:50 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!mx05.eternal-september.org!feeder.eternal-september.org!news.bbs-scene.org!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!j2no3161991qak.0!news-out.google.com!f7ni478qai.0!nntp.google.com!j2no1927362qak.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 1 Jul 2013 05:00:50 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=155.253.16.227; posting-account=uPViEgkAAACC04vaTYL5Kyk76brV1MA_ NNTP-Posting-Host: 155.253.16.227 References: <1fxsf70zl2ckq.aysy7d9c8jkl$.dlg@40tude.net> <40bf5a31-b09a-4106-a57a-7ac3dd5f951e@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Thick bindings to a C library and gnattest: suggestions? From: Maurizio Tomasi Injection-Date: Mon, 01 Jul 2013 12:00:50 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:16007 Date: 2013-07-01T05:00:50-07:00 List-Id: Many thanks Simon, my problem was that I cannot decide "a priori" when to link statically and when dynamically, but you helped me in devise a solution: project cfitsio is for Externally_Built use "true"; for Source_Files use (); for Library_Dir use external("CFITSIO_LIB_DIR"); for Library_Name use "cfitsio"; for Library_Kind use external("CFITSIO_LINKING"); end cfitsio; On my laptop running Linux Mint I have both the static and dynamic versions of CFITSIO, and now I am able to compile them using these commands: CFITSIO_LIB_DIR=/usr/lib/x86_64-linux-gnu CFITSIO_LINKING=dynamic gprbuild test_driver.gpr CFITSIO_LIB_DIR=/usr/lib/ CFITSIO_LINKING=static gprbuild test_driver.gpr So, one of my problems is fully solved! Maurizio.