Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to compile using boost.python?
    text
    copied!<p>I am trying to compile a project using boost.python as documented <a href="http://www.boost.org/doc/libs/1_55_0/libs/python/doc/tutorial/doc/html/python/hello.html" rel="nofollow">on this page</a>. My platform is MacOS X, i386 architecture. I am using the current version of boost, v1.55. The example provided in <code>${BOOST}/libs/python/example/tutorial/</code> compiles and works properly. However, when setting up my own project in a different directory outside of the <code>boost</code> root directory, I run into the following problem: when I type <code>${BOOST}/bjam toolset=darwin architecture=x86 address-model=32</code> I get the following error message:</p> <pre><code>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 </code></pre> <p>The documentation of the <code>bjam</code> tool is not referenced, <code>bjam --help</code> only returns an error message and Googling only finds <a href="http://www.boost.org/boost-build2/doc/html/bbv2/jam.html" rel="nofollow">this page</a> (which doesn't talk about the problem at all) and <a href="http://www.boost.org/doc/libs/1_42_0/doc/html/jam/usage.html" rel="nofollow">this page</a> (which seems to be outdated as indicated by the link at the top of the page).</p> <p><strong>Question:</strong> How do I specify the path of the <code>boost-build.jam</code> file? Or, alternatively, is there any other way to use boost.python with standard tools?</p> <p><strong>Update 3:</strong> The option <code>-d4</code> lets <code>bjam</code> print verbose debugging output. If the name of the compiler is known, the output can be <code>grep</code>ped for the compiler invocation. This can then be used to construct a "regular" <code>Makefile</code>. See e.g. <a href="http://www.shocksolution.com/python-basics-tutorials-and-examples/linking-python-and-c-with-boostpython/" rel="nofollow">this post</a> for an example of how to do so (albeit it assumes that the compile and linker commands are known).</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload