前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Linux上安装Boost C++ Libraries

Linux上安装Boost C++ Libraries

作者头像
大江小浪
发布2018-07-25 10:06:15
2.3K0
发布2018-07-25 10:06:15
举报
文章被收录于专栏:小狼的世界

Boost C++ 库(Libraries)是一组扩充C++功能性的经过同行评审(Peer-reviewed)且开放源代码程序库。大多数的函数为了能够以开放源代码、封闭项目的方式运作,而授权于Boost软件授权条款(Boost Software License)之下。许多Boost的开发人员是来自C++标准委员会,而部份的Boost库成为C++的TR1标准之一。[1]

为了要确保库的效率与弹性,Boost广泛的使用模板(template)功能。而它是针对各式领域的C++用户与应用领域(Application Domain)上,包含的库类从像smart_ptr 库这种类通用库,到像是文件系统操作系统抽象层,甚至能够利用Boost来开发额外的库或是给高级的C++用户利用,像是MPL

Boost的安装

参考官方的安装文档,利用 Easy Build and Install 可以进行方便的安装。

Issue the following commands in the shell (don't type $; that represents the shell's prompt):

$ cd path/to/boost_1_47_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-libraries=library-name-list options to limit the long wait you'll experience if you build everything. Finally,

$ ./b2 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.

以上是1.47的安装方法,1.39也有类似的方法,但是生成的二进制程序叫做 bjam 而不是 b2。

参考资料:

1、Boost C++ Libraries

2、Get Started with Boost

3、Boost 1.39 编译安装手记

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2011-08-18 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档