Boost 试用

Posted on 2007-05-22 17:43  怪香客  阅读(363)  评论(1)    收藏  举报

1.安装
www.boost.org找到安装说明,在SF上下载1.34.
系统中已经装好VS2005Pro,没有装Python,设置安装脚本如下

#rem build and install boost
# 1. run boost_1_34_0\tools\jam\src\build.bat ,generate bin.ntx86\bjam.exe which compile boost
cd tools\jam\src\build.bat

copy bin.ntx86\bjam.exe ..\..\..\

bjam "-sVC80_ROOT=C:\Program Files\Microsoft Visual Studio 8\VC" "-sTOOLS=vc-8_0" --prefix=d:\Boost install

会生成bjam.exe,设置好了环境变量后,复制到根路径下,再进行进行安装,安装时头文件复制到include\boost-1_34\boost, lib中的lib开头的是static library,boost开头的是dynamic compiled library。lib的命名规则也要注意,toolset  vc80后有几种形式,编译时程序会自动根据VS设置去找适当的库。

在VS的设置中添加include和lib.

2.然后就可以写例程来测试了。

博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3