VS2008下编译Boost(转载+更改)

VS2008下编译Boost
转自:http://blog.csdn.net/mnorst/article/details/6616949 

本文档编译的boost库基于windows xp系统

1,boost下载

如果不想自己编译,可下载http://sourceforge.net/projects/boost/files/boost/1.53.0/,安装后,程序会提供选项供下载已经编译好的库文件,基于vs2008的所有库大概有1.3G。

下载boost最新版本:http://sourceforge.net/projects/boost/files/boost/

2,boost编译

      a,解压boost_1_53_0.7z

      b,打开 Visual Studio 2008 命令提示

      c,切换路径到boost_1_53_0根目录

      d,运行bootstrap.bat,生成b2.exe

      e,运行b2.exe,编译出指定的boost库,命令如下:

b2 --toolset=msvc-9.0 --build-type=complete

      f,编译成功后,库文件所在目录:\boost_1_53_0\stage\lib

      g,编译成功后提示:

[plain] view plaincopyprint?

  1. The Boost C++ Libraries were successfully built! 
  2. The following directory should be added to compiler include paths: 
  3.     E:/Himalayas/dev/6-SDK/cgal/source/CGAL-3.7/auxiliary/boost/boost_1_53_0 
  4. The following directory should be added to linker library paths: 
  5.     E:\Himalayas\dev\6-SDK\cgal\source\CGAL-3.7\auxiliary\boost\boost_1_53_0\sta 
  6. ge\lib 
The Boost C++ Libraries were successfully built!

The following directory should be added to compiler include paths:

    E:/Himalayas/dev/6-SDK/cgal/source/CGAL-3.7/auxiliary/boost/boost_1_53_0
The following directory should be added to linker library paths:

    E:\Himalayas\dev\6-SDK\cgal\source\CGAL-3.7\auxiliary\boost\boost_1_53_0\sta
ge\lib

编译过程录像: http://download.csdn.net/source/3560492
原文地址:https://www.cnblogs.com/xiangwengao/p/3052318.html