Brief introduction
Boost is a set of libraries for the C + + programming language that provide support for tasks and structures such a s linear algebra, pseudorandom number generation, multithreading, image processing,regular expressions, and unit testing. It contains over eighty individual libraries. (from Wiki)
Installation steps
: Http://sourceforge.net/projects/boost/files/boost/1.58.0/boost_1_58_0.tar.bz2/download
Libraries required prior to compilation
1 sudo install mpi-default-Dev # MPI related2sudoinstall libicu-Dev # Regular Expresion related3sudoinstall python-Dev # python dev related 4 sudo install Libbz2-dev # I Don't know
Compile and install boost
1 tar XF boost_1_58_0. Tar . GZ 2 cd boost_1_58_0/3 ./bootstrap. SH 4 ./b2-a-shave_icu=1 # The parameter means that it support ICU or Unicode5Sud oInstall
Test if boost is installed successfully
C + + code (TESTBOOST.CPP)
1#include <iostream>2#include <boost/timer.hpp>3 4 using namespaceboost;5 6 intMain ()7 {8 timer T;9Std::cout <<"Max TimeSpan:"<< T.elapsed_max ()/3600<<"h"<<Std::endl;TenStd::cout <<"min TimeSpan:"<< t.elapsed_min () <<"s"<<Std::endl; One AStd::cout <<"Now itme Elapsed:"<< t.elapsed () <<"s"<<Std::endl; - - returnexit_success; the}
Compiling instructions
1 g++ testboost.cpp-lboost_system-lboost_filesystem-o testboost
Run results
Ubuntu 14.04 compile and install boost 1.58