boost如何安装?

我用的是vc9.0 。。。
怎么弄。。。

Windows下Boost库安装方法
1. 概述
Boost库的安装的方法,IDE涉及DEV C++和VS 2008。
2. 下载
直接下载链接:参见网页 http://www.boost.org/users/history/version_1_46_1.html,这里的链接网速很慢,78MB的东西,下载了10%左右,就定住了,试了三次都是这样,基本放弃了这个下载链接。
SVN下载链接,文件保存在“D:\Boost”下:参见网页 http://www.boost.org/users/download/,对于1.46版本的Boost,如果完全编译后,可能需要12-15GB的空间,虽然还没编译就占了3GB。
3. VS2008 Boost库编译(-vc9)
首先,编译bjam,在命令行下,运行bootstrap.bat -vc9
然后,编译库。在命令行下,运行:
bjam stage --toolset=msvc-9.0 --without-graph --without-graph_parallel --without-math --without-mpi --without-python --without-serialization --without-wave --stagedir="D:\Boost\bin\vc9" link=static runtime-link=shared threading=multi debug release
bjam stage --toolset=msvc-9.0 --without-graph --without-graph_parallel --without-math --without-mpi --without-python --without-serialization --without-wave --stagedir="D:\Boost\bin\vc9" link=static runtime-link=static threading=multi debug release
编译用了50分钟左右,产生了303MB的文件。
4. VS2008 Boost库配置
Tools -> Options -> Projects and Solutions -> VC++ Directories
在Library files中,增加D:\Boost\bin\vc9\lib
在Include files中,增加D:\Boost\
其中,Library的目录就是前面编译产生的那些库文件保存到的位置
  其中,Include的目录随着Boost的不同版本会不同,现在1.47版本只要指定为D:\Boost即使用SVN下载Boost的文件夹就可以了。
温馨提示:答案为网友推荐,仅供参考
第1个回答  推荐于2016-06-28
step1.从www.boost.org下载boost库
step2 在 tools\build\jam_src目录下 运行build.bat来生成jam
step3 设置环境变量
PATH= C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\boost\tools\build\jam_src\bin.ntx86;%PATH%
PATH = C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\boost;C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\boost\tools\build\jam_src\bin.ntx86;%PATH%
SET MSVC_ROOT="C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7"
SET VC7_ROOT="C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7"
SET VISUALC="C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7"
SET JAM_TOOLSET=VISUALC
step 4 编译boost库
切换到含有boost-build.jam的目录下运行jam就可以了。
写一个简单的程序就可以试试 boost怎么样了。本回答被提问者采纳
相似回答