如何将 boost 库安装到我的 MinGW 编译器中?
我在 Windows MinGW 安装上使用 g++ 从命令行进行编译。我如何获得提升...概念上或者如果很简单...我需要下载和安装什么?
I'm compiling from the command line using g++ on a Windows MinGW installation. How do I get boost...conceptually or if it is easy...what do I need to download and install?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我知道这是一个老问题,但为了以后访问此页面的人可以尝试此网站,以供参考,
http://nuwen.net/mingw.html
他们已经完成了所有艰苦的工作,因此您不必这样做。此页面上的最新发行版有 boost 1_52_0 (这是我撰写本文时 boost 网站上的最新版本),包括我相信您要求的单独编译的库(例如 boost 线程、boost regex 等)
I know this is an old question but for future reference for anybody coming to this page try this website,
http://nuwen.net/mingw.html
They have done all the hard work so you don't have to. The most recent distribution on this page has boost 1_52_0 (which is the latest version on the boost website as I'm writing this) including the separately compiled libraries (e.g. boost thread, boost regex etc) which I beleive you're asking for
我花了几个小时为 Boost 1.54 寻找一个好的解决方案。如果您已经拥有 MinGW 并且只是寻找有关编译二进制 boost 库的说明,请尝试以下操作:
从 boost_X_XX_X 目录,转到
<前><代码>.\tools\build\src\engine
并输入:
这将创建一个名为
bin.ntx86
或bin.ntx86_64
的文件夹,具体取决于你的建筑。将此目录添加到您的 PATH 环境变量中。返回到您的 boost_X_XX_X 目录并输入:
这对我的系统有用。我很想知道其他系统是否在执行这些说明时遇到问题。
I spent hours searching for a good solution for Boost 1.54. If you already have MinGW and you're just looking for instructions on compiling the binary boost libraries, try this:
From your boost_X_XX_X directory, go to
and type:
This will create a folder called
bin.ntx86
orbin.ntx86_64
depending on your architecture. Add this directory to your PATH environment variable.Return to your boost_X_XX_X directory and type:
This worked for me on my system. I'd be interested to know if other systems have trouble with these instructions.
然而,还有一种更简单但相同的方法; bootstrap.bat 会自动完成 bjam 调用之前的步骤:
参考:https://stackoverflow.com/a/13257930/2171309< /a>
However there would have been a simpler, yet identical way; your steps until the bjam call are automatically done by bootstrap.bat:
Reference: https://stackoverflow.com/a/13257930/2171309
感谢尼尔·克鲁斯。这对我有用。我安装了 Qt 5.4 和 mingw 4.9。我下载了boost 1.59。转到“...\boost_1_59_0\tools\build\src\engine\”文件夹
转到“...\boost_1_59_0\”文件夹,相应地更改boost路径
Thanx to Neal Kruis. This worked for me. I have Qt 5.4 with mingw 4.9 installed. I downloaded boost 1.59. Go to "...\boost_1_59_0\tools\build\src\engine\" folder
go to "...\boost_1_59_0\" folder, change boost path accordingly