[英]How to build Boost (from github) with MASM in Windows?
Last year Boost (from the modular boost git repository) could be built in Windows using these steps . 去年,可以使用以下步骤在Windows中构建Boost(来自模块化boost git存储库)。
I got quite far almost a year later, using this recipe: 差不多一年后,我使用了这个食谱:
C:\\Windows\\WinDDK\\7600.16385.1\\bin\\x86\\amd64; C:\\Windows\\WinDDK\\7600.16385.1\\bin\\x86
bin/
directory to the Windows path 将其bin/
目录添加到Windows路径 boost
, run 在boost
的父目录中,运行 git clone --recursive https://github.com/boostorg/boost.git boost > clone.log
bootstrap gcc
project-config.jam
, change using msvc ;
在project-config.jam
, using msvc ;
更改using msvc ;
into using gcc ;
using gcc ;
b2 headers
(now needed to make symbolic links) b2 headers
(现在需要进行符号链接) b2 -a -d+2 -q --build-type=complete --build-dir=build toolset=gcc link=shared runtime-link=shared threading=multi
These options to b2
worked with previous versions of boost, but now I can only compile with b2
without options. 这些对b2
选项可以与早期版本的boost一起使用,但是现在我只能使用不带选项的b2
进行编译。 The full command line returns these errors: 完整的命令行返回以下错误:
undefined reference to __imp_make_fcontext
and undefined reference to __imp_make_fcontext
,
undefined reference to __imp_jump_fcontext
. undefined reference to __imp_jump_fcontext
。
I cannot find other posts or even web pages that describe these errors. 我找不到描述这些错误的其他帖子甚至网页。 Does anyone know a way in Windows to still use the b2
options for the latest boost from the GitHub repository? 有谁知道Windows中仍然可以使用b2
选项从GitHub存储库获得最新提升的方法吗?
EDIT : 编辑 :
Using b2 -a -d+2 -q --build-dir=build toolset=gcc
works. 使用b2 -a -d+2 -q --build-dir=build toolset=gcc
可以工作。 Apparently the --build-type=complete
option is the first of the ones above to break the compilation. 显然--build-type=complete
选项是上面第一个破坏编译的选项。
The flags link=shared
, runtime-link=shared
and threading=multi
also cause b2
to stop. 标志link=shared
, runtime-link=shared
和threading=multi
也会导致b2
停止。
Has anyone got a clue how to solve this? 有没有人知道如何解决这个问题? is there a patch for MinGW that works for the current repositories? MinGW是否有适用于当前存储库的补丁?
Your best bet may be switching to MSYS2 which is a new and improved version of MSYS. 最好的选择是切换到MSYS2,这是MSYS的新版本和改进版本。 I have very good experience with MSYS2 whereas I can't say that about MSYS or Cygwin (In my case that's building a project heavily using boost and c++11). 我在MSYS2方面有很好的经验,而关于MSYS或Cygwin则不能这么说(就我而言,这是大量使用boost和c ++ 11构建项目)。
You can read some comparison here . 您可以在这里阅读一些比较。
Also taken from the answer here : 也从这里的答案中获取:
While MSYS isn't dead, I would say it's not looking very healthy either. 虽然MSYS还没死,但我也想说它也不是很健康。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.