How do I build Boost 1.55 with MinGW?(如何使用 MinGW 构建 Boost 1.55?)
问题描述
我已经下载了 Boost 1.55 和 MinGW.
I have downloaded Boost 1.55 and MinGW.
控制台回答我没有任何命令.我无法理解如何绑定两个路径并激活 GCC 编译器.
The console answers me that I haven't any command. I can't understand how to bind two paths and activate the GCC compiler.
P.S.:如果我使用 Microsoft 的编译器构建 boost,我将有大约 8 个错误,错误 3861!
P.S.: If I build boost with Microsoft's compiler I will have about 8 mistakes with error 3861!!
我该如何构建它?
推荐答案
首先确保你的 mingw 的 bin 目录在你的环境中 PATH 所以 gcc 和 g++ 可从命令提示符调用.然后进入你解压文件的boost根目录.
First make sure your mingw's bin directory is in your environment PATH so gcc and g++ is callable from your command prompt. Afterwards go into your boost's root directory of where you extracted the files.
按照引导程序 + b2.exe 进行构建.例如,假设您只想编译 boost 的正则表达式部分.以下命令应该可以解决问题:
Follow that with a bootstrap + b2.exe to build. For example, let's say you only want to compile the regex portion of boost. The follow commands should do the trick:
bootstrap gcc
b2 toolset=gcc regex
您可以使用:
b2 --show-libraries
获取您可以单独构建的模块列表.当然,您可以通过以下方式构建所有这些:
to get a listing of modules you can build individually. Of course you can build all of them with just:
b2 toolset=gcc
查看 Boost Invocation可用选项的详细列表.
Check out Boost Invocation for a detailed list of available options.
这篇关于如何使用 MinGW 构建 Boost 1.55?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何使用 MinGW 构建 Boost 1.55?
基础教程推荐
- 如果我为无符号变量分配负值会发生什么? 2022-01-01
- CString 到 char* 2021-01-01
- GDB 显示调用堆栈上函数地址的当前编译二进制文 2022-09-05
- 通过引用传递 C++ 迭代器有什么问题? 2022-01-01
- 为什么 typeid.name() 使用 GCC 返回奇怪的字符以及如 2022-09-16
- 初始化列表*参数*评估顺序 2021-01-01
- 为什么派生模板类不能访问基模板类的标识符? 2021-01-01
- 我应该对 C++ 中的成员变量和函数参数使用相同的名称吗? 2021-01-01
- 非静态 const 成员,不能使用默认赋值运算符 2022-10-09
- 为什么 RegOpenKeyEx() 在 Vista 64 位上返回错误代码 2021-01-01
