[Scons-users] Link program without build directory in link path?
edA-qa mort-ora-y
eda-qa at disemia.com
Sun Aug 6 06:26:07 EDT 2017
I'm having trouble with this approach since setting LIBS=[...] appears
to replace the entire libraries list instead of extending it.
Sconstruct:
https://gist.github.com/mortoray/1bcfb60cfe3c20c2740fd1f8f27442f6
Sconscript:
https://gist.github.com/mortoray/f56cdbe1fd2b07c030ee5eb129aeaccf
On 05/08/17 20:13, Bill Deegan wrote:
> If I had to guess you're doing something like this:
>
> x=SharedLibrary('leaf_lang',[....])
> y=Program('leaf',LIBS=[x]) ? or x as a source..
>
> Try Program('leaf',LIBS='leaf_lang')
>
> Your program link line should have -L<Somedir> and -lleaflang
>
> -Bill
>
> On Sat, Aug 5, 2017 at 2:19 AM, edA-qa mort-ora-y <eda-qa at disemia.com
> <mailto:eda-qa at disemia.com>> wrote:
>
> I'm using |Program| to build an executable and link several
> libraries created with |SharedLibrary|. The problem I'm having is
> that the resulting executable has the build directory as part of
> the link path, thus if I move the files somewhere else they fail
> to work.
>
> I have a |build| directory where I output files, so the |gcc|
> command ends up looking something like this:
>
> |g++-o build/leaf build/bin/leaf.o build/libleaf_lang.so|
>
> If I run |ldd| on the resulting |build/leaf| file I get this link:
>
> |build/libleaf_lang.so (0x00007fdee8711000)|
>
> It has linked to the shared library in the |build| directory,
> which is not what I want. I want it referenced without path so I
> can install these files elsewhere. That is, I just want a link to
> |libleaf_lang.so| without the |build/| part.
>
> Note: I don't specify |build| in my Program/SharedLibray commands,
> this is done using a |VariantDir| directive.
>
>
> --
> 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 <mailto:Scons-users at scons.org>
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> <https://pairlist4.pair.net/mailman/listinfo/scons-users>
>
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
--
edA-qa mort-ora-y
http://mortoray.com/
Leaf - the language we always wanted
http://leaflang.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20170806/e9a093e0/attachment.html>
More information about the Scons-users
mailing list