Boost logo

Boost-Build :

From: Preston A. Elder (prez_at_[hidden])
Date: 2007-08-07 19:47:24


On Sat, 04 Aug 2007 08:35:35 +0400, Vladimir Prus wrote:

> Chris Stankevitz wrote:
>
>> Hello,
>>
>> With gcc, I link to a library that has already been compiled by passing
>> this to gcc:
>> -L /home/chris/lib -lmylib
>>
>> How do I do this with Boost.Build V2?
>
> Is there a reason why the second example in
>
> http://boost.org/boost-build2/doc/html/bbv2/tasks/libraries.html
>
> does not work for you?
>
> - Volodya

Actually, this is NOT working for me. Boost.Build seems to add the -l
arguments, but not the -L arguments when I use <search>.

Here is my Jamfile:

lib uuid ;
lib tinyxml : : <name>tinyxml <search>$(TINYXML_ROOT) ;
lib boost_filesystem : : <name>boost_filesystem-gcc41-mt <search>
$(BOOST_ROOT)/stage/lib ;
lib boost_system : : <name>boost_system-gcc41-mt <search>$(BOOST_ROOT)/
stage/lib ;
lib boost_thread : : <name>boost_thread-gcc41-mt <search>$(BOOST_ROOT)/
stage/lib ;
exe hard_coded
        : hard_coded.cpp /mantra/core/log//log
          uuid tinyxml boost_filesystem boost_system boost_thread
        : <include>$(TINYXML_ROOT) ;

For completeness, here is my Jamroot:

import os ;

path-constant MANTRA_ROOT : . ;
local BOOST_ROOT = [ os.environ BOOST_ROOT ] ;
local TINYXML_ROOT = [ os.environ TINYXML_ROOT ] ;

project
        : requirements <include>. <include>$(BOOST_ROOT)
        ;

use-project /mantra/core/log : libs/core/log ;
use-project /mantra/utils/throttler : libs/utils/throttler ;

By rights it SHOULD generate -L arguments, but the g++ link argument has
no -L flags in it at all. The -l arguments are all there, but no -L
arguments. I set BOOST_ROOT to $HOME/src/boost and TINYXML_ROOT to $HOME/
src/tinyxml, which gets imported above, and since the compiles work I
know that is fine.

PreZ


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk