boost.png (6897 bytes) Home Libraries People FAQ More

PrevUpHomeNext

Build

Building the Libraries
Testing the Libraries

How you build the libraries, and how you build your own applications that use those libraries, are some of the most frequently asked questions. Build processes are difficult to deal with in a portable manner. That's one reason why makes use of . In general you should refer to the documentation for . This document will only supply you with some simple usage examples for how to use bjam to build and test . In addition, this document will try to explain the build requirements so that users may create their own build processes (for instance, create an IDE specific project), both for building and testing , as well as for building their own projects using .

Building the Libraries

To build the libraries using , simply change to the directory boost_root/libs/thread/build and execute the command:

bjam -sTOOLS=toolset

This will create the debug and the release builds of the library.

Note

Invoking the above command in boost_root will build all of the Boost distribution, including .

The Jamfile supplied with produces a dynamic link library named boost_thread{build-specific-tags}.{extension}, where the build-specific tags indicate the toolset used to build the library, whether it's a debug or release build, what version of Boost was used, etc.; and the extension is the appropriate extension for a dynamic link library for the platform for which is being built. For instance, a debug library built for Win32 with VC++ 7.1 using Boost 1.31 would be named boost_thread-vc71-mt-gd-1_31.dll.

The source files that are used to create the library are all of the *.cpp files found in boost_root/libs/thread/src. These need to be built with the compiler's and linker's multi-threading support enabled. If you want to create your own build solution you'll have to follow these same guidelines. One of the most frequently reported problems when trying to do this occurs from not enabling the compiler's and linker's support for multi-threading.

Testing the Libraries

To test the libraries using , simply change to the directory boost_root/libs/thread/test and execute the command:

bjam -sTOOLS=toolset test

Last revised: July 17, 2004 at 04:33:59 GMT

Copyright © 2001-2003 William E. Kempf

PrevUpHomeNext