我正在尝试在Windows 7上为Clang构建Boost 1_74_0。我转到带有引导程序等的文件夹并运行:
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 变量中。
我应该如何解决这个问题?
我假设您的clang
版本是使用您上一个问题中的VS2019
安装的。
因此,您需要从Developer Command Prompt for VS 2019
发出命令。 由于您已经将 Clang bin 文件夹添加到PATH
env 变量中,因此以下内容应该适合您:
bootstrap.bat --with-toolset=clang-win
b2 toolset=clang-win link=shared threading=multi --build-type=complete stage
注意:这将构建 32 位boost
库二进制文件。
以下命令应生成 64 位boost
库二进制文件:
b2 toolset=clang-win address-model=64 link=shared threading=multi --build-type=complete stage
但是,它仅生成exception
和test_exec_monitor
二进制文件。
其他二进制文件(包括date_time
(报告链接器错误。