如何使用Visual Studio C++ 11构建Boost (我尝试过的1.48.0版本)?bootstrap.bat
找不到工具集vc11
。我向F:\Programming\boost_1_48_0\tools\build\v2\engine\build.bat
添加了工具集vc11,但收到一条消息:
ERROR: Cannot determine the location of the VS Common Tools folder.
编辑: Ferruccio answer适用于VS 2012 Express和Boost 1.51.0。
发布于 2011-11-22 07:44:45
通过以下步骤,我成功地构建了它:
它确实生成了许多关于无法检测工具包版本的警告,但无论如何它都会继续进行。
更新:我创建了名为cclibs的GitHub存储库,它使构建Boost和其他一些C++库变得更简单。
发布于 2013-05-28 21:33:16
这个答案适用于:
VS2012
(Visual Studio 2012更新2) VS2015
(Visual Studio 2015更新2)
简而言之,
All Programs..Microsoft Visual Studio 2012..Visual Studio Tools..x64 Native Tools Command Prompt
.boost_1_53_0.zip
to C:\boost153
.bootstrap.bat
bjam.exe
(可选)分步说明
cd c:\boost153
.bootstrap.bat
.bjam.exe
将其All Programs..Microsoft Visual Studio 2012..Visual Studio Tools..x64 Native Tools Command Prompt
.Boost C++库已成功构建!以下目录应添加到编译器包括路径:C:/ project.
C:/boost153
添加到compiler include path
,将C:\boost153\stage\lib
添加到linker library path
。
Properties
,然后选择Configuration Properties..VC++ Directories
。参见下面屏幕截图中的两部分粗体文本):
foreach
循环的支持来展示boost的强大功能://下面的源代码复制自: // http://www.boost.org/doc/libs/1_53_0/doc/html/foreach.html #include "stdafx.h“#include #include #include //支持_getch() #include int main() { std::string hello( " hello,world!”);BOOST_FOREACH( char ch,hello){ std::cout << ch;} _getch();return 0;}
你好,世界!
更多答案
的
更新2016-05-05
已使用Win10 x64
+ VS2015.2
+ Boost v1.6.0
进行检查。
发布于 2013-12-01 11:29:44
bootstrap.bat
bjam.exe --工具集=msvc-11
https://stackoverflow.com/questions/8204758
复制相似问题