Boost logo

Boost-Build :

Subject: Re: [Boost-build] What is the most proper way to use installed boost library in couple with boost.build?
From: Dmitry Timoshenko (dimentiy2k_at_[hidden])
Date: 2011-09-03 12:51:49


> There is a boost.jam shipped with boost build (in contrib dir) for this
> purpose.
>

Thank you for the answer and for your time.

I read the manuals within the boost.jam comments. I tried to use it, but
encountered a problem.

1. First issue
----------------

I put the boost configuration into project-config.jam and it looks like this

...

if $(use-pre-built-boost)
{
   ECHO "Using boost pre-built libraries" ;

   using boost
     :
       1.46
     :
       <include>$(BOOST_INCLUDE_PATH)
       <library>$(BOOST_LIBRARY_PATH)
     ;
} else
{
   ECHO "Using boost source tree" ;

   using boost : 1.46 : <root>$(BOOST_ROOT) ;
}

...

If I use a source tree everything is ok and get compiled, but if the
pre-built library is used I get the error on first boost usage:

Unable to find file or target named
error: '/boost/filesystem//boost_filesystem'
error: referred from project at
error: '.'

If I specify --debug-configuration I get the notice from boost.build

notice: using boost library 1.46 <include>C:\Boost\include\boost-1_46_1
<library>C:\Boost\lib

that means the 'using' rule is called and worked out.

Where am I wrong?

2. Second issue
----------------

How to avoid explicit specification of boost version while declaring boost?

In case of boost source tree (BOOST_ROOT) I can use something like this

use-project boost : $(BOOST_ROOT) ;

But I want to use pre-built boost with no version specified, i.e. I only
want to specify BOOST_INCLUDE_PATH and BOOST_LIBRARY_PATH

When I try to omit the version I get the error.

using boost
     :
     :
       <include>$(BOOST_INCLUDE_PATH)
       <library>$(BOOST_LIBRARY_PATH)
     ;

How can I achieve the desired?

Thank you.


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