FARSIGHT Tutorials/Building Software/Installing Boost

From FarsightWiki
Revision as of 21:45, 12 June 2009 by Curtis (Talk | contribs)
Jump to: navigation, search

Boost is a project providing open source portable C++ source libraries. It has become a suite of de facto standard libraries for C++. Jace requires the Boost Thread module in order to handle C++ threads in a platform independent way.


Contents

Installing Boost on Linux

To install dependencies on Debian-based Linux, execute:

sudo apt-get install ant cmake boost-thread-dev subversion sun-java6-jdk

Other distributions of Linux are likely to have similar Boost packages available through their respective package managers as well.


Installing Boost on Windows

The easiest way to install the Boost Thread library on Windows is to use the free installer from BoostPro.

When running the installer:

  • Under "Compilers," check the version of Visual C++ matching your system.
  • Under "Variants," check all eight boxes.
  • When choosing components, check "Boost DateTime" and "Boost Thread."


Installing/Compiling Boost on Mac OS X

  1. Visit the Boost web site.
  2. Click the "Getting Started Guide" link.
  3. Click the "Getting Started on Unix variants" link in the lower right corner.
  4. Download the Boost distribution using the link in the "1 Get Boost" section.
  5. Unpack the Boost distribution into a temporary directory; e.g.:
tar xjf boost_1_38_0.tar.bz2

Finally, build the source using the "Easy Build and Install"; e.g.:

cd boost_1_38_0
sudo ./configure
sudo make install

This will install Boost into a subdirectory of /usr/local; e.g.:

/usr/local/include/boost-1_38

Depending on your version of Boost, you may need to edit bf-cpp's CMakeLists.txt to tweak the Boost_ADDITIONAL_VERSIONS variable to include your version.

Using MacPorts

Alternately, you can use MacPorts:

sudo port install boost
Personal tools