# A.8. Boost

The VOS core library depends on the Boost threads library as well as some other Boost headers. Version 1.31 or greater is needed. VOS also uses the Boost unit testing framework for some of its tests, but as the test programs are optional, this is not necessary to successfully build VOS.

## A.8.1. Boost Packages

Prebuilt Boost libraries are available for some systems: check your operating system's software package resources for more information.

• On Windows, the vos-win32-mingw-libs and vos-win32-msvc-libs packages are provided which libraries and headers for boost.

• Debian users should install the "libboost-thread-dev" package:

$apt-get install libboost-thread-dev • RedHat users should install the "boost-1.31" package, or a more recent version, if available. • Macintosh OS X users using Fink should install the "boost1.32" package from Fink. Please note that as of this writing this package is in the "unstable" Fink distribution. See this FAQ entry for information on how to access the unstable branch. ## A.8.2. Manually Building Boost From Source If you installed the Boost thread library from a prebuilt package as described above, you may skip this section. If a prebuilt Boost thread library is not available for your system, you must download and compile it yourself. Download the latest version of Boost for your platform at http://www.boost.org/download. Follow the instructions for building and installing Boost. You will need to install the bjam program (a build manager system similar to make used by Boost). Copy bjam somewhere so that it is in your run path. To build bjam on Unix, go into boost_1_31_0/tools/build/jam_src and build it by running the build.sh script found inside. The output bjam binary will be in a subdirectory called bin.YOURPLATFROM (e.g. "bin.x86"). Copy bjam to /usr/local/bin or some other place in your PATH. To build bjam on Windows, open the DOS shell cmd.exe and go to boost_1_31_0/tools/build/jam_src. Run build.bat to produce bjam.exe. Once bjam is installed, unpack boost and enter the unpacked "boost_1_31_0" directory. • On Linux and most other Unix platforms, use $ bjam -sTOOLS=gcc boost_thread

• On Macintosh OS X, use

\$ bjam -sTOOLS=darwin boost_thread

• On Windows with MinGW, using the DOS shell cmd.exe, run the following (you may need to first add MingW to your %PATH%):

C:\path\to\boost_1_31_0> bjam -sTOOLS=mingw boost_thread

Unfortunately, there is no automated tool to install Boost, so you must do it manually.

• On Linux and MacOS X, copy the resulting libraries from libs/thread/build/bin and libs/regex/build/bin (they will be beneath a couple of subdirectories) to /usr/local/lib/. You can try this command to copy all of the boost libraries to /usr/local/lib:

cp find libs/ -name \*.so\* -type f /usr/local/lib/
On MacOSX, replace so with dylib. Then copy or link the boost directory to /usr/local/include/boost.