[Scons-users] Link program without build directory in link path?

Bill Deegan bill at baddogconsulting.com
Sat Aug 5 14:13:52 EDT 2017


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>
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 wantedhttp://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/20170805/e618d501/attachment-0001.html>


More information about the Scons-users mailing list