目录
1. 获得Boost
进入Boost的网站(http://www.boost.org/) 下载boost_1_62_0.zip
2. 解压Boost
解压 boost_1_62_0.zip
,比如解压到 D:\Program Files\boost\boost_1_62_0
。
3. 仅需头文件的库
许多人会问:“我该如何安装Boost库?” 实际上,常使用的boost库函数是不需要安装的。
无需安装的库函数如下:
- Boost.Chrono
- Boost.Context
- Boost.Filesystem
- Boost.GraphParallel
- Boost.IOStreams
- Boost.Locale
- Boost.MPI
- Boost.ProgramOptions
- Boost.Python (see the Boost.Python build documentation before building and installing it)
- Boost.Regex
- Boost.Serialization
- Boost.Signals
- Boost.System
- Boost.Thread
- Boost.Timer
- Boost.Wave
需要安装的库函数如下:
- Boost.DateTime
- Boost.Graph
- Boost.Random
- Boost.Exception
4. 用Boost跑一个程序
我们用无需安装的库函数来运行一个程序,code如下,命名为:example.cpp
#include <boost/lambda/lambda.hpp>
#include <iostream>
#include <iterator>
#include <algorithm>
int main()
{
using namespace