I've built boost from source because I need the latest version to build pyopencv with. That all went fine.
However, bjam now can't find the boost libs or includes because now they're no longe开发者_StackOverflow社区r in /usr/lib, now they're in /usr/local/lib and /usr/local/include.
(I did add /usr/local/lib to LD_LIBRARY_PATH)
Now bjam complains:
boost-build.jam:2: in module scope
rule using unknown in module
on the first line of my boost-build.jam which says:
using python;
How do I tell bjam where to look for includes? I've looked at the Boost.Build docs, but can't seem to make out how to set the include path.
It's not the Boost headers failing to find (yet), it's the BoostBuild2 sources it's failing to find. You either need to use the BBV2 sources from the Boost tree, or install BBv2 separately (the BBv2 install is explained here). Assuming you read the Boost Python documentation on how to get started using that library (see the BPL docs).. You need to also follow the instructions on how to modify the startup/template BBv2 project in those instructions to build your own Python extensions using BBv2 (see the Modifying the Example Project, Relocate the Project section).
Also note that the line above you have should be: using python ;
-- I.e. the spaces are important.
精彩评论