diff --git a/doc/building.html b/doc/building.html index e03c1ef7..56aca62e 100644 --- a/doc/building.html +++ b/doc/building.html @@ -55,15 +55,6 @@
Building your Extension Module
-
-
-
The Easy Way
- -
Building your module outside the Boost - project tree
-
-
-
Build Variants
Building Using the Microsoft Visual Studio @@ -83,7 +74,7 @@

Normally, Boost.Python extension modules must be linked with the boost_python shared library. In special circumstances you may want to link to a static version of the boost_python - library, but if multiple Boost.Pythone extension modules are used + library, but if multiple Boost.Python extension modules are used together, it will prevent sharing of types across extension modules, and consume extra code space. To build boost_python, use Boost.Build in the usual way @@ -275,45 +266,49 @@ bjam -sTOOLS=Building your Extension Module - Though there are other approaches, the best way to build an extension - module using Boost.Python is with Boost.Build. If you have to use another - build system, you should use Boost.Build at least once with the + Though there are other approaches, the smoothest and most reliable + way to build an extension module using Boost.Python is with + Boost.Build. If you have to use another build system, you should + use Boost.Build at least once with the "-n" option so you can see the command-lines it uses, and replicate them. You are likely to run into compilation or linking problems otherwise. -

The Easy Way

- Until Boost.Build v2 is released, cross-project build dependencies are - not supported, so it works most smoothly if you add a new subproject to - your boost installation. The libs/python/example - subdirectory of your boost installation contains a minimal example (along - with many extra sources). To copy the example subproject: + The libs/python/example + subdirectory of your boost installation contains a small example + which builds and tests two extensions. To build your own + extensions copy the example subproject and make the following two edits: -
    -
  1. Create a new subdirectory in, libs/python, say - libs/python/my_project.
  2. +
      +
    1. boost-build.jam - +edit the line which reads -
    2. Copy libs/python/example/Jamfile to your new - directory.
    3. +
      +
      +boost-build ../../../tools/build ;
      +
      +
      -
    4. Edit the Jamfile as appropriate for your project. You'll want to - change the "subproject" rule invocation at the top, and - the names of some of the source files and/or targets.
    5. -
    +so that the path refers to the tools/build subdirectory +of your Boost installation. + + +
  3. Jamrules - +edit the line which reads + +
    +
    +path-global BOOST_ROOT : ../../.. ;
    +
    +
    +so that the path refers to the root directory of your Boost installation. +
+ +

The instructions above for testing Boost.Python apply equally to your new extension modules in this subproject. -

Building your module outside the Boost project - tree

- If you can't (or don't wish to) modify your boost installation, the - alternative is to create your own Boost.Build project. A similar example - you can use as a starting point is available in this archive. You'll need to edit the - Jamfile and Jamrules files, depending on the relative location of your - Boost installation and the new project. Note that automatic testing of - extension modules is not available in this configuration. -

Build Variants

Three variant