windows下编译和安装boost库

来源:互联网 发布:电脑降温软件排名 编辑:程序博客网 时间:2024/05/14 17:11

   编译位boost

      我用的编译器是vs2008,刚开始我下载的是boost_1_65_1.zip,可能boost版本太高编译错误,后来我就选用boost_1_57_0.zip

      解压文件boost_1_57_0

      编译

 

      和位环境不同,x64环境下编译得先从开始菜单启动VisualStudio的VisualStudio 2008 x64Win64 CommandPrompt进入命令提示符,而不是随便打开任意一个命令行窗口就行。然后转到boost根文件夹,运行bootstrap.bat生成x64版的bjam.exe。然后运行命令:

 

      bjam.exe --toolset=msvc-9.0architecture=x86address-model=64link=static --build-type=complete--with-system--with-thread--with-date_time--with-filesystem--with-serialization--with-regex

      即可生成DLL版平台库,如果要编译静态库版就把shared改为static。

 

 

      vs2008include和lib目录

      includeD:\D6000-Develop\V1.4\boost_1_57_0

      lib D:\D6000-Develop\V1.4\boost_1_57_0\stage\lib




原创粉丝点击