Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-10-03 00:30:58


brock_peabody wrote:
> How do you import boost libraries so that:
>
> exe exe_name : exe_name.cpp /boost/thread ;

Eh... that would mean you depend on "/boost/thread" project, not an individual
library. This will work, but might not be what you want.

> or as seen in the manual:
>
> exe app : app.cpp core utils /boost/filesystem//fs ;

This should work...

> Both give me the error: "error: Unable to resolve target-
> id /boost/thread"?
>
> I can get this to work as in the manual with "use-project" for my
> own projects. But I can't get:
>
> use-project /thread : /boost/libs/thread/build ;

This is expected to work. But if you put this line, you should use "/thread"
to use boost threads library, not "/boost/thread".

> To work, it says there is no Jamfile in that directory (there is).

Strange. I believe I've made a fix recently (~2 weeks ago) which adds
Jamfile.v2 to a list of jamfile spelling automatically searched for.

> Anyway, what's the correct way to depend on a boost library?

Just what you wrote above. Well, with a minor correction. Instread of

use-project /thread : /boost/libs/thread/build ;

I'd use

use-project /boost/thread : /boost/libs/thread/build ;

and after that

exe a : a.cpp /boost/thread//boost_thread ;

should work. Testing now... I attach a test project which works for me with
CVS HEAD of Boost.Build.

HTH,
Volodya

 --Boundary-00=_SmQf/HdXpUKTm49 Content-Type: application/x-zip;
name="tt.zip"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="tt.zip"

[Attachment content not displayed.] --Boundary-00=_SmQf/HdXpUKTm49--


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