C 编译器 cl.exe 无法编译简单的测试程序

问题描述

我正在尝试使用 cmake Visual Studio 16 2019 和 Qt 6 设置 VTK, 但是当我尝试配置 cmake 时,我有以下 pb :

Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19042.
The C compiler identification is MSVC 19.28.29337.0
The CXX compiler identification is MSVC 19.28.29337.0
Detecting C compiler ABI info
CMake Error at C:/Program Files/CMake/share/cmake-3.19/Modules/CMakeDetermineCompilerABI.cmake:48 (try_compile):
  Failed to open

    C:/Users/mathi/Documents/VTK/VTK-9.0.1/build/CMakeFiles/CMakeTmp/CMakeLists.txt

  Permission denied
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.19/Modules/CMakeTestCCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)
  CMakeLists.txt:19 (project)


Detecting C compiler ABI info - failed
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe
CMake Error at C:/Program Files/CMake/share/cmake-3.19/Modules/CMakeTestCCompiler.cmake:53 (try_compile):
  Failed to open

    C:/Users/mathi/Documents/VTK/VTK-9.0.1/build/CMakeFiles/CMakeTmp/CMakeLists.txt

  Permission denied
Call Stack (most recent call first):
  CMakeLists.txt:19 (project)


Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.19/Modules/CMakeTestCCompiler.cmake:66 (message):
  The C compiler

    "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:19 (project)


Configuring incomplete,errors occurred!
See also "C:/Users/mathi/Documents/VTK/VTK-9.0.1/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/mathi/Documents/VTK/VTK-9.0.1/build/CMakeFiles/CMakeError.log".

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...