用MinGW搭buildBoost 1.52

我试图find一个关于如何使用MinGW来构buildBoost 1.52的授权答案。 我在互联网上发现了一些build立起来的指针,像这样:

cd tools\build\v2\engine build.bat mingw copy bin.ntx86\bjam.exe ..\..\..\.. cd ..\..\..\.. bjam --toolset=gcc 

由于这些指令可以追溯到Boost 1.45 ,因为我无法用Boost自己的指令来validation,所以我想validation上述步骤是否正确使用MinGW来构buildBoost。

我自己尝试了这些步骤, 似乎构build了Boost,但是我还没有做过广泛的testing(我也不会有这样的概念)。

对,那是正确的。 然而,会有一个更简单但却相同的方法。 直到bjam调用的步骤由bootstrap.bat自动完成:

 C:\boost_1_52_0> bootstrap.bat mingw Building Boost.Build engine ... C:\boost_1_52_0> b2 toolset=gcc 

如果没有明确指定,库将被放置在stage\lib目录下,includepath是安装根目录。 要testing安装,可以使用将您的程序链接到Boost库的示例。

参考: 安装 , 准备使用Boost库二进制文件