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.42.148.72 with SMTP id q8mr4751362icv.6.1394114588166; Thu, 06 Mar 2014 06:03:08 -0800 (PST) X-Received: by 10.182.221.225 with SMTP id qh1mr94518obc.0.1394114588051; Thu, 06 Mar 2014 06:03:08 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!l13no3190898iga.0!news-out.google.com!h8ni13igy.0!nntp.google.com!l13no3190890iga.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 6 Mar 2014 06:03:07 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=193.136.60.48; posting-account=qOKjyQoAAACkueA1sEk2JOzdoAkAN1Qg NNTP-Posting-Host: 193.136.60.48 References: <783ad521-d54a-4c28-8c76-9afb84f4a396@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <8e9ed6f4-4197-4a16-9623-faefda40c7c5@googlegroups.com> Subject: Re: Defining the invocation of a shell command in a gpr project file From: David Pereira Injection-Date: Thu, 06 Mar 2014 14:03:08 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:18792 Date: 2014-03-06T06:03:07-08:00 List-Id: Great post man! :-) Thanks a lot! Cheers, David Sexta-feira, 14 de Fevereiro de 2014 17:46:41 UTC, Simon Wright escreveu: > Simon Wright writes: > > > > > David Pereira writes: > > > > >> So, my question is this: is it possible to invoke a shell command when > > >> using gnatmake or gprbuild? I am implementing a binding to C library > > >> and, since I am in Mac Os, I have to call the command > > >> install_name_tool to change the path point to where the library I am > > >> using is available, after the binary is compiled and linked. > > > > > > I think you can get away with using -rpath; see the last few paras of > > > the dyld(1) man page, online at [1], as pointed out to me in a comment > > > on [2]. > > > > > > You could try > > > > > > package Linker is > > > for Linker_Options use > > > ("-L/path/to/c/lib", > > > "-lclib", > > > "-rpath", > > > "/path/to/c/lib"); > > > end Linker; > > > > Turns out there's more to it than that. I've written up my > > investigations at [1]; the key was that the C dylib needs to have an > > @rpath in its name too. > > > > Well, it works for me. Hope it helps you. > > > > [1] http://forward-in-code.blogspot.co.uk/2014/02/c-libraries-and-runpath.html