How to compile using boost.python?

754 views Asked by At

I am trying to compile a project using boost.python as documented on this page. My platform is MacOS X, i386 architecture. I am using the current version of boost, v1.55. The example provided in ${BOOST}/libs/python/example/tutorial/ compiles and works properly. However, when setting up my own project in a different directory outside of the boost root directory, I run into the following problem: when I type ${BOOST}/bjam toolset=darwin architecture=x86 address-model=32 I get the following error message:

Unable to load Boost.Build: could not find "boost-build.jam"
---------------------------------------------------------------
Attempted search from ${CURRENT_PATH} up to the root at ${SOME_OTHER_PATH} and in these directories from BOOST_BUILD_PATH and BOOST_ROOT: /usr/share/boost-build.
Please consult the documentation at 'http://www.boost.org'.
make: *** [all] Error 1

The documentation of the bjam tool is not referenced, bjam --help only returns an error message and Googling only finds this page (which doesn't talk about the problem at all) and this page (which seems to be outdated as indicated by the link at the top of the page).

Question: How do I specify the path of the boost-build.jam file? Or, alternatively, is there any other way to use boost.python with standard tools?

Update 3: The option -d4 lets bjam print verbose debugging output. If the name of the compiler is known, the output can be grepped for the compiler invocation. This can then be used to construct a "regular" Makefile. See e.g. this post for an example of how to do so (albeit it assumes that the compile and linker commands are known).

0

There are 0 answers