Installing Boost
Procedure
- Use PuTTY to log in to the server as the root user.
- Upload the Boost source package to the /path/to/BOOST directory.
- Decompress the Boost installation package.
cd /path/to/BOOST tar -xvf boost_1_58_0.tar.gz
- Go to the directory generated after the decompression.
cd boost_1_58_0
- Modify the Boost source code.
sed -ri 's/\-m64/\-mabi=lp64/g' `grep -Rl '\-m64'`
- Perform the configuration.
./bootstrap.sh --prefix=/path/to/BOOST/boost_1_58_0/build --with-libraries=system,filesystem,serialization,program_options --with-toolset=gcc
- Perform the compilation and installation.
./b2 install
- Set the Boost environment variable.
export LD_LIBRARY_PATH=/pat/to/BOOST/lib:$LD_LIBRARY_PATH
Parent topic: Configuring the Compilation Environment