comp.lang.ada
 help / color / mirror / Atom feed
From: David Pereira <dmrpereira@gmail.com>
Subject: Re: Defining the invocation of a shell command in a gpr project file
Date: Thu, 6 Mar 2014 06:03:07 -0800 (PST)
Date: 2014-03-06T06:03:07-08:00	[thread overview]
Message-ID: <8e9ed6f4-4197-4a16-9623-faefda40c7c5@googlegroups.com> (raw)
In-Reply-To: <ly7g8x4mf2.fsf@pushface.org>

Great post man! :-)

Thanks a lot!

Cheers,
David

Sexta-feira, 14 de Fevereiro de 2014 17:46:41 UTC, Simon Wright escreveu:
> Simon Wright <simon@pushface.org> writes:
> 
> 
> 
> > David Pereira <dmrpereira@gmail.com> 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

      reply	other threads:[~2014-03-06 14:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-12 14:10 Defining the invocation of a shell command in a gpr project file David Pereira
2014-02-12 20:30 ` Simon Wright
2014-02-13 12:47   ` David Pereira
2014-02-14 17:46   ` Simon Wright
2014-03-06 14:03     ` David Pereira [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox