我一直试图在Windows中使用b2编译Boost库,但使用Clang/C2(Clang 3.7与Microsoft CodeGen(,但没有成功。由于VisualStudio在构建时提供了几个可供使用的工具集,因此指定哪一个似乎不太困难。我看到了另一篇关于"在windows上使用clang 3.8构建boost"的帖子,但他建议将其用作b2的命令行是错误的,因为它并没有真正从MSVC调用clang编译器。使用以下命令行发帖的人员:
b2 --build-dir=build toolset=clang --build-type=complete stage
我对b2和Boost.构建工具不熟悉。。。我只想使用带有Clang/C2的MSVC的Boost,而不是默认的编译器。
如有任何反馈,我们将不胜感激。。
Juan Dent
BTW:我正在使用Visual Studio 2015更新3。
boost
支持mac os x
上的clang
,因此它应该在windows
和linux
上构建。
在windows
上,默认情况下为visual studio
生成boost
。当为mingw
构建时,我在b2
之前运行bootstrap.bat mingw
。因此,要在windows
上为clang
构建,请确保clang
在PATH
中,并尝试:
cd boost_1_xx_0
bootstrap.bat clang
b2 -j8 toolset=clang address-model=64 architecture=x86 --build-dir=build --build-type=complete stage