Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

With scons, how do you link to prebuilt libraries?

I recently started using scons to build several small cross-platform projects. One of these projects needs to link against pre-built static libraries... how is this done?

In make, I'd just append "link /LIBPATH:wherever libstxxl.lib" on windows, and "stxxl.a" on unix.

like image 987
paxos1977 Avatar asked Oct 14 '08 04:10

paxos1977


1 Answers

Just to document the answer, as I already located it myself.

Program( 'foo', ['foo.cpp'], LIBS=['foo'], LIBPATH='.' )

Adding the LIBS & LIBPATH parameters add the correct arguments to the build command line.

More information here.

like image 71
paxos1977 Avatar answered Nov 14 '22 17:11

paxos1977