[Scons-users] modify linker command

gabor papp gabor.papp.lists at gmail.com
Tue Jun 19 16:12:50 EDT 2012



> This uses on my system the *.dylib. I check eg for boost_iostream. If I run the CheckLib

> Scons create the g++ flag -lboost_iostream

> The forced option is, to use dynamic linking (see g++ FAQ).


you can use CheckLib with autoadd=0, and add boost to the libs manually.
something like this should work:
env.Append(LIBS = [File('/usr/lib/libboost_iostream.a')])

or if you use autoadd you can remove the lib first like this:
env['LIBS'].remove('boost_iostream')
then append the static one as above.

if you don't know the path for the lib, i believe you can search for
it like this:
path = FindFile('libboost_iostream.a', env['LIBPATH'])

best,
gabor


More information about the Scons-users mailing list