having trouble compiling: The CMAKE_C_COMPILER: (etc etc ) is incorrect... #17957
Replies: 2 comments
-
It looks like you updated Visual Studio, but CMake is not aware of this. Is this in Qt Creator? If so:
Summary: let Qt Creator re-detect the compilers, then make sure that the selected "kit" uses this newly detected compiler, and then clear the CMake cache and re-run CMake so that it will look for the compiler again and find the one from the kit. |
Beta Was this translation helpful? Give feedback.
-
edit: maybe i spoke too soon. you're a genius! thanks! yeah, with musescore i dont ever compile in the IDE. i only compile and test builds etc in qt. i find it's the only thing that works for me. there is a LOT to qt i'm finding out. anyways, thanks again for helping. your suggestions fixed it for me. :) |
Beta Was this translation helpful? Give feedback.
-
C:\Users\somet\Documents\VisualStudioRepositories\MuseScoreUseThis01\MuseScore\CMakeLists.txt:25: error: The CMAKE_C_COMPILER: D:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.34.31933/bin/HostX64/x64/cl.exe is not a full path to an existing compiler tool. Tell CMake where to find the compiler by setting either the environment variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.
i found where the compiler is supposed to be at on my computer:
"D:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.35.32215\bin\Hostx64\x64\cl.exe"
i tried changing it by adding a few lines to the cmake:
cmake_policy(SET CMP0091 OLD) # not set MSVC default args
project(mscore LANGUAGES C CXX)
###added these lines:
set(CMAKE_C_COMPILER "D:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.35.32215/bin/Hostx64/x64/cl.exe")
set(CMAKE_CXX_COMPILER "D:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.35.32215/bin/Hostx64/x64/cl.exe")
###added these lines up above ^^
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_MODULE_PATH
${CMAKE_CURRENT_LIST_DIR}
${CMAKE_CURRENT_LIST_DIR}/build
${CMAKE_CURRENT_LIST_DIR}/build/cmake
${CMAKE_MODULE_PATH}
)
and those also didn't work.
i should have made sure that everything was working on my computer before asking to be assigned to a bug. idk if i was on the right direction of fixing the problem or not.
i think the dependencies are up to date as far as i know. i remember qt asking to update something, but i think i dismissed it.
Beta Was this translation helpful? Give feedback.
All reactions