您的位置:首页 > 运维架构 > Linux

linux下用cmake编译安装boost1.40

2009-11-23 22:05 447 查看
boost已经更新到1.40版了,记得1.37版安装的时候可以直接使用cmake来编译安装,现在boost安装又简化了,看下官方的安装步骤吧:

Issue the following commands in the shell (don't type $

; that
represents the shell's prompt):

$

cd path/to/

boost_1_40_0

$

./bootstrap.sh --help

Select your configuration options and invoke ./bootstrap.sh

again
without the --help

option. Unless you have write permission in
your system's /usr/local/

directory, you'll probably want to at
least use

$

./bootstrap.sh --prefix=

path

/to

/installation

/prefix

to install somewhere else. Also, consider using the
--show-libraries

and --with-

library_name
options to limit the
long wait you'll experience if you build everything. Finally,

$

./bjam install


will leave Boost binaries in the lib/

subdirectory of your
installation prefix. You will also find a copy of the Boost
headers in the include/

subdirectory of the installation
prefix, so you can henceforth use that directory as an #include

path in place of the Boost root directory.

默认的安装路径是/usr/local/,我什么都不修改,就两步搞定(我的是ubuntu9.10)。

进入已解压的boost目录下,运行:

./bootstrap.sh

sudo ./bjam install

然后等着安装,就ok了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: