Boost logo

Boost Users :

Subject: Re: [Boost-users] how to link libraries in Jamroot?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-07-13 11:49:34


AMDG

Arne Kalaghan wrote:
> I am not very experienced with boost. I try to learn how to use the boost.thread library. After early bjam compilation errors (undefined references, because the boost_thread library was not linked), I found that this Jamroot creates my executable successfully:
>
> exe threadtest : threadtest.cpp
> : <library>/usr/lib/libboost_thread-gcc42-mt-1_34_1.so.1.34.1
> ;
>
> Is it possible to simplify the <library> parameter to something like "boost_thread"? The reason is that I am developing on different systems with different boost versions, so that I don't want to hardcode the library version in the Jamroot. I thought that the boost.build system should be smart enough that it finds the appropriate library file if you only tell it "use the thread library please".
>
> How can I make the Jamroot independent from the boost installation and, more importantly, from the operation system?
>

You can use the boost module. For documentation run
bjam --help boost

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net