Skip to content

Instantly share code, notes, and snippets.

@573
Created March 2, 2012 09:28
Show Gist options
  • Save 573/1957162 to your computer and use it in GitHub Desktop.
Save 573/1957162 to your computer and use it in GitHub Desktop.
building boost libraries (boost::python, -test, -filesystem, -exception etc.)
:: Opened a cmd.exe prompt from Visual Studio Express (advantage environment is set accordingly)
pushd K:\build-site-dependencies\boost_1_49_0\tools\build\v2
bootstrap.bat
.\b2.exe --prefix=K:\build-site-dependencies\boost_1_49_0 install
pushd K:\build-site-dependencies\boost_1_49_0
set PATH=K:\build-site-dependencies\boost_1_49_0\bin;%PATH%
b2 --show-libraries
b2 --build-dir="K:\build-site-dependencies\boost_1_49_0\built" --build-type=complete toolset=msvc python=2.6 --with-python --with-test --with-filesystem --with-exception stage
@573
Copy link
Author

573 commented Mar 2, 2012

my %userprofile%/user-config.jam file for the b2 build tool looks like:

# Boost.Python user configuration file.

# MSVC configuration
using msvc : 10.0 ;

# Python configuration
# First entry is default
# (Optional) to build with python 2.3, add python=2.3 to your command line
using python
          : 2.3 # version
          : C:/Python23
                        # cmd-or-prefix
          : C:/Python23/include
                        # includes
          : C:/Python23/libs
                        # libs
          : <toolset>msvc
                        # condition
          ;

# To build with python 2.6, add python=2.6 to your command line
using python
          : 2.6 # version
          : C:/Programme/Python26
                        # cmd-or-prefix
          : C:/Programme/Python26/include
                        # includes
          : C:/Programme/Python26/libs
                        # libs
          : <toolset>msvc
                        # condition
          ;
#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment