Because the latest boost Library Based on GCC4.8.1 is used, boost1.53 is installed by default with apt-getinstall, and GCC4.7.3 is not what I want. Therefore, we decided to download the source code and compile it in Ubuntu13.04. Download (the following parts can be changed, with reference to the boost )))wget-oboost_1_54_0.tar.bz2 http://downloads.sourceforge.n
Because the latest boost Library Based on GCC4.8.1 is used, boost1.53 is installed by default with apt-get install, and GCC4.7.3 is not what I want. Therefore, we decided to download the source code and compile it in Ubuntu 13.04.
Download (the following path may change. For details, refer to the boost website link)
Wget-O boost_000054_0.tar.bz2 http://downloads.sourceforge.net/project/boost/boost/1.54.0/boost_1_54_0.tar.bz2? Counter & ts = 1375162670 & use_mirror = jaist
Decompress:
Tar -- bzip2-xf./boost_1_54_0.tar.bz2
Start to compile, all compilation takes too much time, so I only select the library I need:
Run the following command to check how many libraries can be compiled:
./Bootstrap. sh -- show-libraries
Building Boost. Build engine with toolset gcc... tools/build/v2/engine/bin. linuxx86_64/b2
The following Boost libraries have portions that require a separate build
And installation step. Any library not listed here can be used by including
The headers only.
The Boost libraries requiring separate building and installation are:
-Atomic
-Chrono
-Context
-Coroutine
-Date_time
-Exception
-Filesystem
-Graph
-Graph_parallel
-Iostreams
-Locale
-Log
-Math
-Mpi
-Program_options
-Python
-Random
-Regex
-Serialization
-Signals
-System
-Test
-Thread
-Timer
-Wave
Then compile the library I want:
./Bootstrap. sh -- with-libraries = system, filesystem, log, thread
Building Boost. Build engine with toolset gcc... tools/build/v2/engine/bin. linuxx86_64/b2
Unicode/ICU support for Boost. Regex ?... Not found.
Generating Boost. Build configuration in project-config.jam...
Bootstrapping is done. To build, run:
./B2
To adjust configuration, edit 'project-config. jam '.
Further information:
-Command line help:
./B2 -- help
-Getting started guide:
Http://www.boost.org/more/getting_started/unix-variants.html
-Boost. Build documentation:
Http://www.boost.org/boost-build2/doc/html/index.html
Then run the following command to complete the compilation.
./B2
Wait patiently. However, not all libraries are compiled. There will be much less time. Compile later. The result is displayed soon:
The Boost C ++ Libraries were successfully built!
The following directory shocould be added to compiler include paths:
/Usr/src/boost_000054_0
The following directory shocould be added to linker library paths:
/Usr/src/boost_000054_0/stage/lib
I forgot to install it. Run the./b2 install command, which is installed on
/Usr/local/lib directory
Header file in
/Usr/local/include/boost directory
Recommended reading:
Boost library full Development Guide-in-depth C ++ "quasi" standard library hd pdf version http://www.linuxidc.com/Linux/2013-07/87574.htm
Ubuntu compilation and installation of boost library http://www.linuxidc.com/Linux/2013-07/87573.htm
Ubuntu compiled boost 1.52b http://www.linuxidc.com/Linux/2013-02/79004.htm
Ubuntu build and install boost and use http://www.linuxidc.com/Linux/2011-04/34790.htm in eclipse C/C ++
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2