diff --git a/doc/building.html b/doc/building.html index 6535e891..92fd1694 100644 --- a/doc/building.html +++ b/doc/building.html @@ -49,6 +49,15 @@
Every Boost.Python extension module must be linked with the
- boost_python shared library. To build
- boost_python, use Boost.Build in the usual way from
- the libs/python/build subdirectory of your boost
+
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
+ 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
+ from the libs/python/build subdirectory of your boost
installation (if you have already built boost from the top level this may
have no effect, since the work is already done).
libs/python/example subdirectory of your boost installation
- contains a minimal example (along with many extra sources). To copy the
- example subproject:
+ 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
+ "-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.
+
+ libs/python/example
+ subdirectory of your boost installation contains a minimal example (along
+ with many extra sources). To copy the example subproject:
libs/python, say
@@ -251,9 +269,14 @@ bjam -sTOOLS=subproject" rule invocation at the top, and
the names of some of the source files and/or targets.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