visual studio – getting a CMake Error trying to compile a program


Here’s the full error:

CMake Error at /opt/devkitpro/msys2/usr/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message):
  The C compiler

    "/c/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.43.34808/bin/HostX64/x64/cl.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: '/c/aseprite/build/CMakeFiles/CMakeScratch/TryCompile-sFrufK'

    Run Build Command(s): "/c/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" -v cmTC_9bbc1
    ninja: error: '/c/aseprite/build/CMakeFiles/CMakeScratch/TryCompile-sFrufK/testCCompiler.c', needed by 'CMakeFiles/cmTC_9bbc1.dir/testCCompiler.c.o', missing and no known rule to make it
  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:23 (project)

I seriously have no idea what could it be, i tried changing the path and it still gives me an error and before you ask yes, I have ninja in the right path

Leave a Reply

Your email address will not be published. Required fields are marked *