[Scons-users] -install_name on OSX for dnyamic libraries

Bill Deegan bill at baddogconsulting.com
Mon Aug 7 14:34:59 EDT 2017


Try:

env.SharedLibrary('hello',['hello.c'],__RPATH='--install_name
@rpath/libhello.dylib')

Take a look at SCons/Tools/link.py to see how SHLNKCOM is defined.

This is a hack to see if it works.
A proper way would be defining __RPATH in the compiler or
SCons/Platform/darwin.py

-Bill


On Mon, Aug 7, 2017 at 10:55 AM, edA-qa mort-ora-y <eda-qa at disemia.com>
wrote:

> I've figured out on OSX how to build shared libraries using RPATH, but
> now I have to convince scons to pass the appropriate options to the linker.
>
> To build a library that is loaded relative to the RPATH:
>
>    g++ -o build/libhello.dylib -install_name @rpath/libhello.dylib
> -dynamiclib build/src/hello.os -Lbuild
>
> To link the main executable:
>
>    g++ -o build/dohello build/src/main.o -Lbuild -lhello
> -Wl,-rpath, at executable_path
>
>
> I don't see how I can pass in an `install_name` to the SharedLibrary
> construct.
>
>
> --
> edA-qa mort-ora-y
> http://mortoray.com/
>
> Leaf - the language we always wanted
> http://leaflang.org/
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20170807/844cd16d/attachment.html>


More information about the Scons-users mailing list