I'm trying make a Visual Studio solution with CMake to compile the latest version of aseprite and CMake keeps giving me the:
No CMAKE_C_COMPILER could be found.
No CMAKE_CXX_COMPILER could be found.
I've already downloaded GCC, and I'm using Visual Studio 2015.
I'm following this tutorial:
None of the solutions here solves my problem - only when I install Windows Update for universal C runtime.
Now CMake is working and no more link hangs from Visual Studio.
Update for Universal C Runtime in Windows
This happened to me after I installed Visual Studio 15 2017.
The C++ compiler for Visual Studio 14 2015 was not the problem. It seemed to be a problem with the Windows 10 SDK.
Adding the Windows 10 SDKs to Visual Studio 14 2015 solved the problem for me.
See attached screenshot.
You can also make sure you are the sudo user and you have READ/WRITE access on the directory you are working. I had a similar problem on OS X, and I got it fixed just by entering in sudo mode.
I updated Visual Studio 2015 update 2 to Visual Studio 2015 update 3, and it solved my problem.
I also experienced this error when working with CMake:
The 'warning' box in the MSDN library article Visual C++ in Visual Studio 2015 gave me the help that I needed.
Visual Studio 2015 doesn't come with C++ installed by default. So, creating a new C++ project will prompt you to download the necessary C++ components.
For me, this problem went away on Windows when I moved my project to a shallower parent directory, i.e. to:
C:\Users\spenc\Desktop\MyProjectDirectory
instead of
C:\Users\spenc\Desktop\...\MyProjectDirectory
.I think the source of the problem was that MSBuild has a file path length restriction to 260 characters. This causes the basic compiler test CMake performs to build a project called
CompilerIdCXX.vcxproj
to fail with the error:C1083: Cannot open source file: 'CMakeCXXCompilerId.cpp'
because the length of the file's path e.g.
C:\Users\spenc\Desktop\...\MyProjectDirectory\build\CMakeFiles\...\CMakeCXXCompilerId.cpp
exceeds the MAX_PATH restriction.
CMake then concludes there is no CXX compiler.