From 7defd3bbed0078ffe475f74f48f9062fbc13bf5d Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Tue, 7 Jan 2003 18:03:17 +0000 Subject: [PATCH] support for BOOST_PYTHON_STATIC_MODULE clarification [SVN r16788] --- doc/building.html | 53 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 15 deletions(-) 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 @@
Building your Extension Module
+
+
+
The Easy Way
+ +
Building your module outside the Boost + project tree
+
+
+
Build Variants
Building Using the Microsoft Visual Studio @@ -65,11 +74,14 @@

Building Boost.Python

-

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).

@@ -231,13 +243,19 @@ bjam -sTOOLS=Building your Extension Module - Though there are other approaches, the easiest way to build an extension - module using Boost.Python is with Boost.Build. 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: + 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. + +

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:
  1. Create a new subdirectory in, 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.
- If you can't modify or copy 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 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