Boost库是C++领域公认的经过千锤百炼的知名C++类库,涉及编程中的方方面面,简单记录一下使用时的安装过程

1.boost库的下载

boost库官网主页:www.boost.org

2.安装

将下载的压缩包解压到指定的目录

3.建立编译工具bjam.exe

在源码目录下执行bootstrap.bat,生成bjam.exe

4.在命令行模式下利用bjam编译boost库,这里利用VS2012自带的命令行工具

D:\Program Files\VS2012\VC>cd D:\Program Files\BoostSDK\boost

D:\Program Files\BoostSDK\boost>bjam stage

D:\Program Files\BoostSDK\boost>bjam stage --toolset=msvc-11.0 --without-graph -
-without-graph_parallel --without-mpi --without-wave --stagedir="D:\Program File
s\BoostSDK\bin\vc110" link=static runtime-link=shared runtime-link=static thread
ing=multi debug release

说明:

--toolset 指明编译工具,msvc-11.0表示Visual Studio 2012

--stagedir 指明编译后库文件的存放路径

--without-mpi表示不编译mpi库,其他的--without类似

boost库中有些库是必须要编译才能使用的,大部分只要引用头文件即可,少数是必须编译成二进制文件的。

摘用官方文档的一点说明:

The first thing many people want to know is, “how do I build Boost?” The good news is that often, there's nothing to build.

Nothing to Build?

Most Boost libraries are header-only: they consist entirely of header files containing templates and inline functions, and require no separately-compiled library binaries or special treatment when linking.

The only Boost libraries that must be built separately are:

A few libraries have optional separately-compiled binaries:

  • Boost.DateTime has a binary component that is only needed if you're using its to_string/from_string or serialization features, or if you're targeting Visual C++ 6.x or Borland.
  • Boost.Graph also has a binary component that is only needed if you intend to parse GraphViz files.
  • Boost.Math has binary components for the TR1 and C99 cmath functions.
  • Boost.Random has a binary component which is only needed if you're using random_device.
  • Boost.Test can be used in “header-only” or “separately compiled” mode, although separate compilation is recommended for serious use.
  • Boost.Exception provides non-intrusive implementation of exception_ptr for 32-bit _MSC_VER==1310 and _MSC_VER==1400 which requires a separately-compiled binary. This is enabled by #define BOOST_ENABLE_NON_INTRUSIVE_EXCEPTION_PTR.

5.安静的等待库的编译完成

Win7下Boost库的安装的更多相关文章

  1. Linux 下 boost 库的安装,配置个人环境变量

    部分引自: https://blog.csdn.net/this_capslock/article/details/47170313 1. 下载boost安装包并解压缩到http://www.boos ...

  2. Mysql依赖库Boost的源码安装,linux下boost库的安装

      boost‘准标准库’安装过程.安装的是boost_1_60_0. (1)首先去下载最新的boost代码包,网址www.boost.org. (2)进入到自己的目录,解压: bzip2 -d bo ...

  3. boost.asio学习笔记一、linux下boost库的安装

    欢迎转载,转载请注明原文地址:http://blog.csdn.net/majianfei1023/article/details/46761029 学习开源库第一步就是编译安装好库,然后执行成功一个 ...

  4. Linux下boost库的编译、安装详解

    下载boost源码 boost下载地址 解压到一个目录 tar -zxvf boost_1_66_0.tar.gz 编译boost库 进入boost_1_66_0目录中 cd boost_1_66_0 ...

  5. VS2013环境下Boost库配置

    序言 最近了解各大互联网公司的校招要求,发现了解Boost程序库也是不可或缺的一部分~ 于是,决定潜心研究下,这个准标准库~ 首先,在官网下载boost的最新版本Boost 1.59.0,这是当前的最 ...

  6. dev c++ Boost库的安装

    dev c++ 的boost库的安装步骤 然后点击“check for updates”按钮 最后点击“Download selected”按钮,下载完成后安装.... 给dev添加boost库文件, ...

  7. Win7下Python2.7环境安装paramiko模块

    Win7下Python2.7环境安装paramiko模块,经过安装并测试成功,整理文档如下: 1.下载安装Windows版本的Python2.7,我默认装在C:\Python27 我的python已经 ...

  8. 在Win7下新建库并修改图标

    win7中在库中添加桌面方法详解 1.在空白处,鼠标右键选择新建——库. 2.命名为桌面,然后选择桌面. 3.鼠标右键选择属性. 4.点击包括文件夹. 5.选择桌面,点击包括文件夹按钮. 6.点击确定 ...

  9. Python3.5在Windows7环境下Scrapy库的安装

    Python3.5在Windows7环境下Scrapy库的安装 忙活了一下午,总算是把Scrapy库给装完了,记下来给需要帮助的人 首先安装的环境:Windows7 64位 Python的版本是:3. ...

随机推荐

  1. UVa11404 - Palindromic Subsequence(区间DP+打印路径)

    题目大意 给定一个字符串,要求你删除尽量少的字符,使得原字符串变为最长回文串,并把回文串输出,如果答案有多种,则输出字典序最小的 题解 有两种解法,第一种是把字符串逆序,然后求两个字符串的LCS,并记 ...

  2. 查看目标文件是否是以-fPIC编译的, ar 打包命令将多个静态库打包到一个里面

    readelf --relocs foo.o | egrep '(GOT|PLT|JU?MP_SLOT)' 上句大多数时候(和平台有关)可以正确判断是否是以fPIC选项编译的,如果输出为空,基本可以表 ...

  3. 问题-关于sharemem程序访问WEB出现内存错误处理

    [delphi技术] 关于sharemem造成dll错误的处理办法问题现象:如果程序和dll之间用string作为参数传递时容易出现错误问题处理:需要在程序的uses中使用sharemem.这个sha ...

  4. mmsql 查询每个分类的前3条数据

    select * from (select *,row_number() over(partition by PropertyRoofBeamID order by PropertyRoomID de ...

  5. CSS- 兼容样式记录

    前面加* 或者_,不是CSS的正常写法,而是利用IE的解析BUG,从而实现所需要的效果.应尽量避免使用吧.* margin-left:32px; /*所有浏览器*/*margin-left:32px; ...

  6. JAVA中List转换String,String转换List,Map转换String,String转换Map之间的转换类

    <pre name="code" class="java"></pre><pre name="code" cl ...

  7. MHA工作原理

    http://my.oschina.net/u/1440383/blog/313798?fromerr=Tvth3ODF

  8. L2TP

    点击查看详情>>   我的贡献 |退出 L2TP 编辑词条 L2TP是一种工业标准的Internet隧道协议,功能大致和PPTP协议类似,比如同样可以对网络数据流进行加密.不过也有不同之处 ...

  9. PAT L1-009. N个数求和

    本题的要求很简单,就是求N个数字的和.麻烦的是,这些数字是以有理数“分子/分母”的形式给出的,你输出的和也必须是有理数的形式. 输入格式: 输入第一行给出一个正整数N(<=100).随后一行按格 ...

  10. 混合文件系统(ramdisk+jffs)

    背景知识: 一.Ramdisk文件系统: 1.掉电丢失 2.读写速度高 3.数据存储到内存 二.jffs文件系统 1.掉电不丢失 2.可存储于NOR NAND,但是适用于NOR 3.数据存储于flas ...