【发布时间】:2015-09-30 09:45:24
【问题描述】:
去年 Boost(来自模块化 boost git 存储库)可以使用 these steps 在 Windows 中构建。
差不多一年后,我用这个食谱走得很远:
- 使用 mingw-get-setup 安装 MinGW(32 位)和 Msys(bash 等)
- 安装 Windows 驱动程序工具包(对于 W7,我使用了 WDK 7 --GRMWDK_EN_7600_1.ISO),它提供了 MASM 8(根据this post 需要提升 > 1.51)
- 下载 ISO 映像并使用 WinRAR 提取文件对我有用
- 安装程序建议不要安装 DSF,所以跳过它
- 将 ML64.exe 和 ML.exe 的目录添加到路径中(都需要)C:\Windows\WinDDK\7600.16385.1\bin\x86\amd64; C:\Windows\WinDDK\7600.16385.1\bin\x86 - 同时安装一个 64/32 位编译器(我使用了 TDM gcc 5.1.0-2)并
将其bin/目录添加到 Windows 路径 - 以管理员身份打开 cmd.exe 并启动 bash
- 在
boost的父目录中,运行git clone --recursive https://github.com/boostorg/boost.git boost > clone.log - 退出 bash,转到目录 boost 并运行:
bootstrap gcc - 在
project-config.jam中,将using msvc ;更改为using gcc ; - 运行:
b2 headers(现在需要建立符号链接)b2 -a -d+2 -q --build-type=complete --build-dir=build toolset=gcc link=shared runtime-link=shared threading=multi
b2 的这些选项与以前版本的 boost 一起使用,但现在我只能使用 b2 不带选项进行编译。完整的命令行返回以下错误:undefined reference to __imp_make_fcontext 和undefined reference to __imp_jump_fcontext。
我找不到描述这些错误的其他帖子甚至网页。有谁知道在 Windows 中仍然可以使用 b2 选项来获取来自 GitHub 存储库的最新提升?
编辑:
使用b2 -a -d+2 -q --build-dir=build toolset=gcc 有效。显然--build-type=complete 选项是上述第一个破坏编译的选项。
标志link=shared、runtime-link=shared 和threading=multi 也会导致b2 停止。
有没有人知道如何解决这个问题?是否有适用于当前存储库的 MinGW 补丁?
【问题讨论】:
标签: windows boost mingw masm undefined-reference