[Home]Boost.Build V2/Installation

BOOST WIKI | Boost.Build V2 | RecentChanges | Preferences | Page List | Links List

Showing revision 8

Chapter 22. Installation

This section describes how to install Boost.Build from a released Boost source distribution or from the latest sources fetched from the Boost CVS repository.

All paths are given relative to the Boost.Build v2 root directory, the top directory of a separate Boost.Build v2 installation or the tools/build/v2 subdirectory of a full Boost libraries source tree.

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 for your platform:

If your platform isn't in the list, or if you downloaded the latest Boost beta sources from CVS instead of an official Boost release, installation guide describes how to compile bjam from sources located in tools/build/jam_src or jam_src by running build.bat or build.sh.

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.

2. It is convenient to copy the executable, called bjam or bjam.exe to a location accessible in your PATH. To verify if you installed the executable properly, 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.

By default, on Windows only system directories are in PATH. Microsoft doesn't recommend to put anything into the system folders. We recommend to create a folder for command line tools such as Boost.Jam (if you don't have one). Then add this folder to your PATH. On Windows XP go to Control Panel - System - Advanced - Environment Variables and add the folder you've just created to the end of PATH variable, using ";" as a separator.

3. Open the user-config.jam file in the Boost.Build root directory and follow the instructions there to describe your compilers, libraries and other tools such as Doxygen.

4. Go to the example/hello/ directory and run bjam there. If you configured your default C++ toolset properly, a simple application will be built in bin/ subdirectory. You can also play with other projects in the example/ directory.

Boost.Jam always needs to be able to find the Boost.Build root directory, where the interpreted source code of Boost.Build (*.jam files) is located. There are two ways to tell bjam about the root directory:

  boost-build /absolute/or/relative/path/to/boost.build ;

This approach allows examples to be built. See examples/boost-build.jam. We recommend this approach: once you've set up a boost-build.jam file in a parent directory of the one in which you do most of your development, it should almost never be necessary to think about it again, and you won't be cluttering your environment with settings specific to a single tool.

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.

[2] Note that packages prepared for Unix/Linux? systems usually make their own choices about where to put things and even which parts of Boost to include. When we say “released source distribution” we mean a distribution of Boost as released on its SourceForge project page.

[3] The Boost.Build subset of boost is distributed separately, for those who are only interested in getting a build tool. The top-level directory of a Boost.Build distribution contains tools/build/jam_src subdirectory and all the subdirectories of the tools/build/v2 subdirectory from a full Boost distribution.

[buy fioricet online] [buy fioricet] [[buy fioricet online]]


BOOST WIKI | Boost.Build V2 | RecentChanges | Preferences | Page List | Links List
Edit revision 8 of this page | View other revisions | View current revision
Edited August 24, 2008 1:12 pm (diff)
Search:
Disclaimer: This site not officially maintained by Boost Developers