如何使用MinGW构建Boost 1.55? [英] How do I build Boost 1.55 with MinGW?

查看:104
本文介绍了如何使用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中,以便可以从命令提示符处调用gccg++.然后进入您提取文件的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.

使用Bootstrap + 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调用可用选项的详细列表.

Check out Boost Invocation for a detailed list of available options.

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

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