在Windows中安装boost_1_60_0 .zip

时间:2016-02-05 06:20:51

标签: c++ windows boost

我已经为Windows 7执行了以下步骤

Boost link http://www.boost.org/doc/libs/1_49_0/libs/python/doc/

1. Downloaded boost_1_60_0 .zip

2. cd \boost_1_60_0\tools\build

3. Ran below command in command prompt

bootstrap.bat gcc        
bjam --toolset=gcc "--prefix=C:\DestinationFolder" install


Now i have b2.exe & bjam.exe in C:\DestinationFolder\bin

任何人都可以帮助我做下一步该怎么做,因为我无法进一步处理

1 个答案:

答案 0 :(得分:10)

既然你的是第三个“如何在Windows上构建提升?”自BOOST_ROOT发布以来我见过的问题是我个人的Windows boost构建说明:

Windows不直接支持boost,因此您可以将其下载并将其放在任何您想要的位置 boost用户指南建议使用boost的位置创建2>&1 | tee ??_build.txt环境变量。

注意:在以下示例中,cd boost_1_xx_0 call bootstrap.bat 是可选的,但保留构建日志很有用...

为Visual Studio 2015构建

在Visual Studio工具命令提示符中:

b2 -j8 toolset=msvc-14.0 address-model=64 architecture=x86 link=static threading=multi runtime-link=shared --build-type=complete stage
2>&1 | tee msvc_static_build.txt

对于静态库:

b2 -j8 toolset=msvc-14.0 address-model=64 architecture=x86 link=shared threading=multi runtime-link=shared --with-thread --build-type=minimal stage
2>&1 | tee msvc_thread_build.txt

注意:必须使用动态链接构建线程,请参阅:https://studiofreya.com/2015/05/20/the-simplest-way-of-building-boost-1-58-for-32-bit-and-64-bit-architectures-with-visual-studio/

对于动态线程库:

b2 -j8 toolset=msvc-14.0 address-model=64 architecture=x86 link=shared threading=multi runtime-link=shared --build-type=complete stage
2>&1 | tee msvc_dynamic_build.txt

对于所有动态库:

cd boost_1_xx_0
bootstrap.bat mingw

b2 toolset=gcc link=shared threading=multi --build-type=complete stage
2>&1 | tee mingw_build.txt

为MinGw构建

确保gcc / mingw在路径中,例如:C:\ Qt \ Tools \ mingw491_32 \ bin

boost 1.61.0

注意:自bootstrap.bat mingw起,您可能需要更改:bootstrap.bat gcc至{{1}}