[Scons-users] modify linker command

William Deegan bill at baddogconsulting.com
Sat Jun 23 16:14:58 EDT 2012


Kraus,

On Jun 19, 2012, at 10:42 PM, Kraus Philipp wrote:


>

> Am 19.06.2012 um 22:12 schrieb gabor papp:

>

>>> 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'])

>

> If I link static, I can not use autoconf, because no function can search the static library, so I must

> write my own CheckStaticLibrary / CheckStaticLibraryWithHeaders

> Is there any option to add a function to the scons general branch that checks also the static libs?


New code is always welcome.
Keep in mind that SCons has a long standing policy of not adding/changing code without an accompanying test which should fail before the code change and pass afterwards. (There are some exceptions to this, but in general we require tests). If you can provide the code change, preferrably with test and doc changes that would simplify getting your changes into SCons.

Hope that helps,
Bill



More information about the Scons-users mailing list