Boost logo

Boost-Build :

From: Jurko Gospodnetić (jurko.gospodnetic_at_[hidden])
Date: 2008-02-08 06:36:52


   Hi Stefan.

> I have installed all Boost 1.34.1 packages on an Ubuntu system,
> including bjam and Boost.Build (2.0m11).

   Pretty much an ancient version by now. I'd suggest getting at m12 (or
the trunk directly from SVN), but that one should work with what you're
trying to do.

> But now I want this example to use for example the Boost.Filesystem library.
>
> What is the proper way to do this on a system like Ubuntu where there
> is no Boost root but instead just installed headers and libraries?

   Sorry, do not have the time to construct an explicit example for you
now...

   If you have the Boost Filesystem build set up using Boost Build then
you can connect your project to that one (use-project or use or some
rule like that - do not remember exactly but is documented) and then
simply reference targets from that project using the project//target syntax.

   If all you have are pre-built headers and libraries then you can
simply add the header location to your include path (e.g as a re
requirement in your project rule) and you can declare your own library
targets (using the lib rule - without any sources specified, just name
of the file) representing pre-built Boost Filesystem libraries. There
are examples for both of this the docs.

   Examples:

Setting up the include path:
     project MyProject
     :
         requirements
         <include>$(PROJECT_SOURCES)
         <include>$(BOOST_BASE)/$(BOOST_VERSION)
     ;

Declaring a per-built library target:
     lib eaylib_static_rtlStatic
     :
     :
         <file>$(OPENSSL_LIBS)/libcrypto.a
     ;

   Hope this helps.

   Best regards,
     Jurko Gospodnetić


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