我正在尝试使用 Visual Studio 在 Windows 10 上安装 LLVM,使用指南http://llvm.org/docs/GettingStartedVS.html,但出现错误:
这是我在 CMake GUI 中的视图,我已指示它使用 C++ 编译器C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
。
我已经为构建创建了一个名为 llvm 的新目录,因为我无法在源目录中构建。
我究竟做错了什么?
配置过程显示以下输出:
The C compiler identification is unknown
The CXX compiler identification is unknown
The ASM compiler identification is MSVC
Found assembler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
CMake Error at CMakeLists.txt:48 (project):
No CMAKE_C_COMPILER could be found.
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
CMake Error: Generator: execution of make failed. Make command was: "MSBuild.exe" "cmTC_c88f4.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=15.0"
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- broken
CMake Error at C:/Program Files/CMake/share/cmake-3.7/Modules/CMakeTestCXXCompiler.cmake:44 (message):
The C++ compiler "C:/Program Files (x86)/Microsoft Visual Studio
14.0/VC/bin/cl.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/dev/llvm/CMakeFiles/CMakeTmp
Run Build Command:"MSBuild.exe" "cmTC_c88f4.vcxproj"
"/p:Configuration=Debug" "/p:VisualStudioVersion=15.0"
Generator: execution of make failed. Make command was: "MSBuild.exe"
"cmTC_c88f4.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=15.0"
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:48 (project)
Configuring incomplete, errors occurred!
See also "C:/dev/llvm/CMakeFiles/CMakeOutput.log".
See also "C:/dev/llvm/CMakeFiles/CMakeError.log".