Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.

Chapter 19. Installation

This section describes how to install Boost.Build from a released source distribution. All paths are given relative to the Boost.Build v2 root directory, which is located in the tools/build/v2 subdirectory of a full Boost distribution.

  1. Boost.Build uses Boost.Jam, an extension of the Perforce Jam portable make replacement. The recommended way to get Boost.Jam is to download a prebuilt executable from SourceForge. If a prebuilt executable is not provided for your platform or you are using Boost's sources in an unreleased state, it may be neccessary to build bjam from sources included in the Boost source tree.
  2. To install Boost.Jam, copy the executable, called bjam or bjam.exe to a location accessible in your PATH. Go to the Boost.Build root directory and run bjam --version. You should see:

                Boost.Build V2 (Milestone N)
                Boost.Jam xx.xx.xx 

    where N is the version of Boost.Build you're using.

  3. Configure Boost.Build to recognize the build resources (such as compilers and libraries) you have installed on your system. Open the user-config.jam file in the Boost.Build root directory and follow the instructions there to describe your toolsets and libraries, and, if neccessary, where they are located.
  4. You should now be able to go to the example/hello/ directory and run bjam there. A simple application will be built. You can also play with other projects in the example/ directory.

If you are using Boost's CVS state, be sure to rebuild bjam even if you have a previous version. The CVS version of Boost.Build requires the CVS version of Boost.Jam.

When bjam is invoked, it always needs to be able to find the Boost.Build root directory, where the interpreted source code of Boost.Build is located. There are two ways to tell bjam about the root directory:

N.B. When bjam is invoked from anywhere in the Boost directory tree other than the Boost.Build root and its subdirectories, Boost.Build v1 is used by default. To override the default and use Boost.Build v2, you have to add the --v2 command line option to all bjam invocations.