系统平台:ubuntu9.04
一、准备工作:
1、下载(安装包),上传(至目标机) --不提。
2、解压,进入解压后目录--也可不提
tar -zxvf boost_1_42_0.tar.gz
cd boost_1_42_0
二、安装
1、 ./bootstrap.sh
屏幕显示如下:
root@EM104:~/boost_1_42_0# ./bootstrap.sh
Building Boost.Jam with toolset gcc... tools/jam/src/bin.linuxx86/bjam
Detecting Python version... 2.6
Detecting Python root... /usr
Unicode/ICU support for Boost.Regex?... not found.
Backing up existing Boost.Build configuration in project-config.jam.1
Generating Boost.Build configuration in project-config.jam...
Bootstrapping is done. To build, run:
./bjam
To adjust configuration, edit 'project-config.jam'.
Further information:
- Command line help:
./bjam --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
2、 ./bjam install
经三十分钟左右完成。显示如下:
gcc.compile.c++ bin.v2/libs/wave/build/gcc-4.3.3/release/link-static/threading-multi/cpplexer/re2clex/aq.o
gcc.compile.c++ bin.v2/libs/wave/build/gcc-4.3.3/release/link-static/threading-multi/cpplexer/re2clex/cpp_re.o
gcc.archive bin.v2/libs/wave/build/gcc-4.3.3/release/link-static/threading-multi/libboost_wave.a
common.copy /usr/local/lib/libboost_wave.a
...failed updating 60 targets...
...skipped 12 targets...
...updated 8432 targets...
注:1、可用./bootstrap.sh -h查看选项,最可能用上的是指定路径:
./bootstrap.sh --prefix=/usr/local/boost1.4
2、 ./bjam install 如不加install的话文件不会拷贝到你指定的安装路径的.