为了使用Microsoft的Clang / C2构建Boost库,使用b2的命令参数 [英] Command parameters for b2 in order to build Boost libraries with Microsoft's Clang/C2

查看:1422
本文介绍了为了使用Microsoft的Clang / C2构建Boost库,使用b2的命令参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在试图使用b2在Windows中编译Boost库,但使用Clang / C2(Clang 3.7与Microsoft CodeGen),没有成功。由于Visual Studio自带了几个工具集在构建时使用,似乎应该不难指定哪个。我已经看到了另一个关于使用clang 3.8在窗口上的增强的帖子,但他建议使用作为b2的命令行是错误的,因为它并不真正调用MSVC的clang编译器。使用以下命令行的人发布:

  b2 --build-dir = build toolset = clang --build-type =完成阶段

我是一个陌生人b2和Boost.Build工具...我想要的是使用Boost从MSVC与Clang / C2而不是默认编译器。



任何反馈将非常感谢..



Juan Dent



BTW:我正在使用Visual Studio 2015 Update 3。

解决方案

boost 支持 clang on mac os x 因此应该在 windows linux 上构建它。



windows Visual Studio c> 默认。当构建 mingw 时,在 b2 bootstrap.bat mingw >。因此,要在 windows 上创建 clang ,请确保 clang PATH 并尝试:

  cd boost_1_xx_0 
bootstrap.bat clang

b2 -j8 toolet = clang address-model = 64 architecture = x86 --build-dir = build --build-type =完成阶段


I have been trying to compile Boost libraries using b2 in Windows but using Clang/C2 (Clang 3.7 with Microsoft CodeGen), to no success. Since Visual Studio comes with several toolsets to use at build time, it seems it shouldn't be too hard to specify which. I have seen another posting relating to "building boost with clang 3.8 on windows" but his proposal to use as command line for b2 is in error because it is not really invoking the clang compiler from MSVC. The person posting that used the following command line:

b2 --build-dir=build toolset=clang --build-type=complete stage

I am a stranger to b2 and the Boost.Build tools... all I want is to use Boost from MSVC with Clang/C2 instead of the default compiler.

Any feedback will be greatly appreciated..

Juan Dent

BTW: I am using Visual Studio 2015 Update 3.

解决方案

boost supports clang on mac os x so it should build it on windows and linux.

On windows boost builds for visual studio by default. When building for mingw I run bootstrap.bat mingw before b2. So to build for clang on windows, ensure that clang is in the PATH and try:

cd boost_1_xx_0
bootstrap.bat clang

b2 -j8 toolset=clang address-model=64 architecture=x86 --build-dir=build --build-type=complete stage

这篇关于为了使用Microsoft的Clang / C2构建Boost库,使用b2的命令参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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