Friday, December 11, 2015

Install boost 1.59.0 (build from source)

Install boost 1.59.0 (build from source)

Get a copy of Boost distribution, download boost_1_59_0.tar.bz2.
Unzip it:
$ tar xf boost_1_59_0.tar.bz2

Type the below commands int the command line:
$ cd boost_1_59_0.tar.bz2
$ ./booststrap.sh --help

Most of boost libraries are only header libraries which does not require a compilation, however there are some libs require a compilation which may slow down you build time, consider using the --show-libraries to see what boost module you want, and using --with-libraries=library-name-list options to specify what you want.(Note: It is recommanded to build all libraries if you are not proficient in or familiar with boost, even if you it may take you more time to build.)
After we are clear about the options need to specifil, we can issue commands like
this:
$ ./bootstrap.sh --prefix=/usr/local --with-libraries=all --libdir=/usr/local/lib --includedir=/usr/local/include 
$ sudo ./b2 install

Refer to official Site:
http://www.boost.org/doc/libs/1_59_0/more/getting_started/unix-variants.html

# Run the script which prepares Boost's build process
sudo ./bootstrap.sh --prefix=/usr/local --with-libraries=all
sudo ./b2 install
 
# Add the Boost libraries path to the default Ubuntu library search path
sudo /bin/bash -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/boost.conf'
 
# Update the default Ubuntu library search paths
sudo ldconfig





















No comments:

Post a Comment