b2 的命令参数,以便使用 Microsoft 的 Clang/C2 构建 Boost 库



我一直试图在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,因此它应该在windowslinux上构建。

windows上,默认情况下为visual studio生成boost。当为mingw构建时,我在b2之前运行bootstrap.bat mingw。因此,要在windows上为clang构建,请确保clangPATH中,并尝试:

cd boost_1_xx_0
bootstrap.bat clang
b2 -j8 toolset=clang address-model=64 architecture=x86 --build-dir=build --build-type=complete stage

最新更新