Building Boost with Clang “Failed to build Boost.build engine”

点点圈 提交于 2021-02-11 13:32:13

问题


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

but I get:

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

and the log says:

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

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

How should I resolve this?


回答1:


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

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

Note: this builds 32 bit boost library binaries.

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

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



来源:https://stackoverflow.com/questions/62440722/building-boost-with-clang-failed-to-build-boost-build-engine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!