编译boost

以boost_1_40_0为例:
1. 从Console进入目录 C:\boost_1_40_0\tools\jam\src\
cd C:\boost_1_40_0\tools\jam\src
2. 运行该目录下的build.bat 有时候需要指定vc版本
如: build.bat vc8, 执行该脚本后,会在相同的目录下生成目录bin.ntx86
3. 将bin.ntx86目录下的bjam.exe拷贝到boost的根目录下(C:\boost_1_40_0)
首先要切换到boost的根目录,然后利用bjam编译你需要的库,如
只编译Python库:E:\Dev\OpenSource\boost_1_40_0>bjam --with-python --toolset=msvc-9.0 --build-dir="D:\tmp" link=shared debug
只编译Test库:    E:\Dev\OpenSource\boost_1_40_0>bjam --with-test --build-dir="D:\tmp" link=shared debug
只编译Program_Options库:E:\Dev\OpenSource\boost_1_40_0>bjam --with-program_options --build-dir="D:\tmp" link=shared debug

Tip:可以通过--toolset=msvc-x.0指定VC版本。

你可能感兴趣的:(C++,c,python,vc++,OpenSource)