|
Boost Users : |
Subject: [Boost-users] How to set include path to boost root (when using bjam)?
From: s seelenluft (sseelenluft_at_[hidden])
Date: 2009-07-01 06:00:33
Hi,
sorry for this very basic question. Bjam complains about not finding the
boost libraries. This line
#include <boost/mathtools/minima.hpp>
in the header of my code triggers:
> error: boost/math/tools/minima.hpp: No such file or directory
I have installed bjam, works fine (I was provided with an appropiate Jamroot
file). I also have installed the boost libraries (via sudo bjam install
--prefix=/usr/local/ --toolset=darwin), installation looks ok. I have added
/usr/local/include/boost-1_39/** to the header search paths in Xcode, seems
to work except for that '*snprintf' *error message (for which I already
found some references).
However, when invoking bjam from the command line, I somehow have to tell it
the location of the boost root directory. I have found some references
saying it should be set in the project's Jamrules file:
http://boost.cppll.jp/HEAD/tools/build/v1/build_system.htm
http://mail.python.org/pipermail/cplusplus-sig/2006-September/010917.html
http://lists.boost.org/boost-users/2004/09/7734.php
I have tried to add either of the following two lines to either to the end
of my Jamroot file or to a separate Jamrules file (both in my project
directory):
path-global BOOST_ROOT : /usr/local/include/boost-1_39 ;
project boost : /usr/local/include/boost-1_39 ;
Adding it the Jamrules file does nothing. Adding them to the Jamroot file
produces two different error messages: 'rule path-global unknown' and
'error: Invalid project attribute'
I have also considered adding these to
/usr/share/boost-build/user-config.jam.
Just for kicks, I also added '/usr/local/include/boost-1_39' to my path.
I know I have to set the include path somewhere (bjam cannot know what
version I am using and thus cannot know the precise path). But I am not sure
where exactly and don't really know what to add exactly.
Thanks.
Markus
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