使用MinGW 5.3.0构建boost 1.61.0 [英] Building boost 1.61.0 with MinGW 5.3.0

查看:202
本文介绍了使用MinGW 5.3.0构建boost 1.61.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人为Mingw建立1.61.0的成功?我已经为此搜索了Google,而且过去显然运行良好的所有建议现在都会导致错误。它无助于提升Windows入门页面是一个结构不完整,不完整的混乱,似乎一段时间以来只有最基本的更新(甚至有一些死链接在那里)。我以某种方式设法为较老的MinGW版本增加了1.58,但是那是在一段时间之前,我愚蠢地忽略写下使它工作所需的各个步骤。 : - \

解决方案

好的,我确实得到它的工作,但显然在boost build system中讨论的这里仍然在提升1.61。我通过跳过遇到这个问题的库并只构建了我需要的库来解决这个问题。这是我的工作。


  1. 将boost_1_61_0.7z下载并解压缩到 D:\Dev\Libs\boost\\ \\ boost__1_61_0

  2. 扩展 PATH 变量以包含包含MinGW g ++。exe的bin文件夹,并确保没有其他g ++。exe实例出现在< (这实际上是第一次让我绊倒了,因为我安装的几个程序都是用自己的g ++版本打包的)。

  3. 打开cmd窗口。

  4. 运行 cd D:\Dev\Libs\boost\boost_1_61_0\tools\build

  5. 运行 .\bootstrap.bat (如果你跳过这个,第6步将会失败,'未知的工具集:mingw'... WTF?
  6. 运行 .\bootstrap.bat mingw

  7. 运行 .\b2.exe install toolset = gcc --prefix = D:\Dev\Libs\boost\boost_1_61_0\b2_for_mingw

  8. 运行 cd D:\Dev\\ \\ Libs \boost\boost_1_61_0

  9. 运行 set PATH =%PATH%; D:\Dev\Libs\ boost \boost_1_61_0\b2_for_mingw\bin

  10. 运行 b2 toolset = gcc --build-type =完成阶段--with -filesystem --with-system (因为我只需要文件系统系统库)。
    ol>

    编辑:对于boost 1.64,必须完全跳过第5步,并且在第6步中需要指定 gcc 来代替 mingw ,正如用户fest的评论中指出的那样。


    Has anyone had any success in building boost 1.61.0 for Mingw? I've Googled for this, and all the suggestions that apparently worked well in the past result in errors now. It doesn't help that boost's "Getting Started on Windows" page is a poorly structured, incomplete mess that seems to have been getting only the most rudimentary updates for a while now (there are even a couple of dead links in there). I somehow managed to build boost 1.58 for an older MinGW version, but that was quite a while ago and I foolishly neglected to write down the individual steps required to make it work. :-\

    解决方案

    Ok, I did get it to work, but apparently the bug in the boost build system discussed here is still in boost 1.61. I worked around that by skipping the libraries that run into this problem and only building the ones that I need. Here's what worked for me.

    1. Download and unzip boost_1_61_0.7z to D:\Dev\Libs\boost\boost_1_61_0
    2. Extend PATH variable to contain bin folder that contains MinGW g++.exe, and make sure no other g++.exe instances appear in PATH before this one (that actually tripped me up the first time, because several programs I've installed come packaged with their own g++ version).
    3. Open cmd window.
    4. Run cd D:\Dev\Libs\boost\boost_1_61_0\tools\build
    5. Run .\bootstrap.bat (if you skip this, step 6 will fail with 'Unknown toolset: mingw' ... WTF???)
    6. Run .\bootstrap.bat mingw
    7. Run .\b2.exe install toolset=gcc --prefix=D:\Dev\Libs\boost\boost_1_61_0\b2_for_mingw
    8. Run cd D:\Dev\Libs\boost\boost_1_61_0
    9. Run set PATH=%PATH%;D:\Dev\Libs\boost\boost_1_61_0\b2_for_mingw\bin
    10. Run b2 toolset=gcc --build-type=complete stage --with-filesystem --with-system (since I only need the filesystem and system libraries).

    EDIT: For boost 1.64, step 5 must be skipped entirely, and in step 6 gcc needs to be specified instead of mingw, as pointed out in the comments by user fest.

    这篇关于使用MinGW 5.3.0构建boost 1.61.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆