【问题标题】:boost_1_60_0 .zip installation in windowsboost_1_60_0 .zip 在 windows 中的安装
【发布时间】:2016-05-15 00:55:14
【问题描述】:

我已经为 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

谁能帮助我下一步该怎么做,因为我无法进一步处理

【问题讨论】:

  • 你有哪个编译器?你确定是gcc吗?
  • 我安装了 MinGW
  • 我宁愿使用prebuilt Windows binaries
  • 我前段时间做过,所以不记得每一步;但我认为这相当简单:下载最新版本 boost_1_60_0-msvc-14.0-64.exeboost_1_60_0-msvc-14.0-32.exe(64 位或 32 位,取决于您的系统),然后运行 ​​exe 文件(例如,在文件夹中打开并双击)。这应该启动一个交互式安装程序,我记得它是通常类型的。对不起,我不能更具体。我发现比较困难的唯一部分是确保编译器找到库。我想我需要将安装目录添加到PATH环境变量中。

标签: c++ windows boost


【解决方案1】:

因为你现在是第三个“我如何在 Windows 上构建提升?”我在1.60.0 发布后看到的问题是我自己的个人 Windows 增强构建说明:

Windows 不直接支持 boost,所以你可以下载它并放在任何你想要的地方。
boost 用户指南建议使用 boost 的位置创建一个BOOST_ROOT 环境变量。

注意:在以下示例中,2>&1 | tee ??_build.txt 是可选的,但保留构建日志很有用...

为 Visual Studio 2015 构建

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

cd boost_1_xx_0
call bootstrap.bat

对于静态库:

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

注意:线程必须使用动态链接构建参见: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 --with-thread --build-type=minimal stage
2>&1 | tee msvc_thread_build.txt

对于所有作为动态库:

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

为 MinGw 构建

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

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

注意:由于boost 1.61.0,您可能需要将:bootstrap.bat mingw 更改为bootstrap.bat gcc

【讨论】:

猜你喜欢
  • 2021-01-20
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-03-17
  • 2014-07-03
  • 1970-01-01
  • 2016-12-11
  • 1970-01-01
相关资源
最近更新 更多