使用Clang构建Boost“无法构建Boost.build引擎" [英] Building Boost with Clang "Failed to build Boost.build engine"

查看:240
本文介绍了使用Clang构建Boost“无法构建Boost.build引擎"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Windows 7上为Clang构建Boost 1_74_0.我转到带有bootstrap等的文件夹并运行:

I am trying to build Boost 1_74_0 for Clang on Windows 7. I go to the folder with bootstrap etc and run:

bootstrap --with-toolset = clang-win

但是我得到了

Building Boost.build engine
Failed to build Boost.build engine

,日志显示:

Found with vswhere Visual Studio Locator version 2.5.2+gebb9f26a3d
###
### "Unknown toolset: vcunk"
###
### You can specify the toolset as the argument, i.e.:
###     .\build.bat msvc
###
### Toolsets supported by this script are: borland, como, gcc,
###     gcc-nocygwin, intel-win32, metrowerks, mingw,
###     vc11, vc12, vc14, vc141, vc142

我确实将Clang bin文件夹添加到了PATH env变量中.

I did add my Clang bin folder to my PATH env variable.

我应该如何解决?

推荐答案

我假定您先前问题中的 clang 版本已安装 VS2019 .

I assume that your version of clang was installed with VS2019 from your previous question.

因此,您需要从 VS 2019开发人员命令提示符中发出命令.由于您已经将Clang bin文件夹添加到您的 PATH env变量中,因此以下内容适用于您:

Therefore, you need to issue the commands from a Developer Command Prompt for VS 2019. Since you've already added the Clang bin folder to your PATH env variable, the following should work for you:

bootstrap.bat --with-toolset=clang-win

b2 toolset=clang-win link=shared threading=multi --build-type=complete stage

注意:这将构建32位 boost 库二进制文件.

Note: this builds 32 bit boost library binaries.

以下命令应该构建64位 boost 库二进制文件:

The following command should build 64 bit boost library binaries:

b2 toolset=clang-win address-model=64 link=shared threading=multi --build-type=complete stage

但是,它仅生成 exception test_exec_monitor 二进制文件.
其他二进制文件(包括 date_time )报告链接器错误.

However, it only builds the exception and test_exec_monitor binaries.
The other binaries, including date_time, report linker errors.

这篇关于使用Clang构建Boost“无法构建Boost.build引擎"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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