vs2008下安装boost
1.下载boost_1_34_1压缩文件,解压缩到d:\\boost_1_34_1\\目录下
  
  2.编译bjam
  
  从vs2008的工具菜单进入命令提示窗口"Visual Studio 2008 Command Prompt"(一定要从这进),cd到c:\\boost_1_34_1\\tools\\jam\\src下执行build.bat,会在c: \\boost_1_34_1\\tools\\jam\\src\\bin.ntx86\\產生bjam.exe,將bjam.exe複製到c: \\boost_1_34_1\\下。
  
  3.设定编译环境
  
  修改user-config.jam (c:\\boost_1_34_1\\tools\\build\\v2\\user-config.jam) 的MSVC configuration
  # MSVC configuration
  
  # Configure msvc (default version, searched in standard location
  # and PATH).
  # using msvc ;
  using msvc : 9.0 : : <compileflags>/wd4819 <compileflags>/D_CRT_SECURE_NO_DEPRECATE <compileflags>/D_SCL_SECURE_NO_DEPRECATE <compileflags>/D_SECURE_SCL=0 ;
  
  4.编译boost
  將目錄移至d:\\boost_1_34_1\\下執行
   bjam –without-python –toolset=msvc-9.0 –prefix=d:\\boost install
  參數說明
  –without-python 表示不使用 python
  –toolset : 所使用compiler,Visual Studio 2008為msvc-9.0
  –prefix:指定編譯後library的安裝目錄
  这一步要花很长时间(大约50分钟)
  5.设定vs2008环境
  Tools -> Options -> Projects and Solutions -> VC++ Directories
  在Library files加上d:\\boost\\lib
  在Include files加上d:\\boost\\include\\boost-1_34_1

…updated 7583 targets…

306 MB (321,375,339 字节
7千多个文件

真是搞不懂·

历史博文

标签:,
八月 18, 2009 at 12:00 上午 by yippee 1,022 次
Category: Dev
Tags: ,