The C compiler is not able to compile a simple test program.

超凡 刘 0 Reputation points
2023-06-09T05:27:07.5533333+00:00
CMake Error at C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.26/Modules/CMakeTestCCompiler.cmake:67 (message):
  The C compiler

    "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/cl.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: D:/Game/AsepriteInstall/source/build/CMakeFiles/CMakeScratch/TryCompile-mq8o7j

    Run Build Command(s):C:/PROGRA~1/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe -v cmTC_a54dd && [1/2] "C:\PROGRA~1\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\bin\Hostx64\x64\cl.exe"  /nologo   /DWIN32 /D_WINDOWS  /D_DEBUG /MTd /Zi /Ob0 /Od /RTC1 -MTd /showIncludes /FoCMakeFiles\cmTC_a54dd.dir\testCCompiler.c.obj /FdCMakeFiles\cmTC_a54dd.dir\ /FS -c D:\Game\AsepriteInstall\source\build\CMakeFiles\CMakeScratch\TryCompile-mq8o7j\testCCompiler.c
    [2/2] cmd.exe /C "cd . && "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_a54dd.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests  -- "C:\PROGRA~1\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\bin\Hostx64\x64\link.exe" /nologo CMakeFiles\cmTC_a54dd.dir\testCCompiler.c.obj  /out:cmTC_a54dd.exe /implib:cmTC_a54dd.lib /pdb:cmTC_a54dd.pdb /version:0.0 /machine:x64  /debug /INCREMENTAL /subsystem:console  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
    FAILED: cmTC_a54dd.exe
    cmd.exe /C "cd . && "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_a54dd.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests  -- "C:\PROGRA~1\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\bin\Hostx64\x64\link.exe" /nologo CMakeFiles\cmTC_a54dd.dir\testCCompiler.c.obj  /out:cmTC_a54dd.exe /implib:cmTC_a54dd.lib /pdb:cmTC_a54dd.pdb /version:0.0 /machine:x64  /debug /INCREMENTAL /subsystem:console  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
    RC Pass 1: command "rc /fo CMakeFiles\cmTC_a54dd.dir/manifest.res CMakeFiles\cmTC_a54dd.dir/manifest.rc" failed (exit code 0) with the following output:
    系统找不到指定的文件。
    ninja: build stopped: subcommand failed.





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


-- Configuring incomplete, errors occurred!
Developer technologies | C++
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.