Set up CMake building path in QT5.12.9
Moved
Solved
Qt Creator and other tools
-
Not sure is this category right.
When I start a new project, it started by trying to compile the project, and I got the below error.
Running C:\Program Files\CMake\bin\cmake.exe "-GCodeBlocks - NMake Makefiles JOM" -C C:\Users\erinli2-t\AppData\Local\Temp\QtCreator-wYLTiH\qtc-cmake-FKdjgwtE\qtcsettings.cmake C:/Users/erinli2-t/Documents/test in C:\Users\erinli2-t\AppData\Local\Temp\QtCreator-wYLTiH\qtc-cmake-FKdjgwtE. loading initial cache file C:\Users\erinli2-t\AppData\Local\Temp\QtCreator-wYLTiH\qtc-cmake-FKdjgwtE\qtcsettings.cmake CMake Deprecation Warning: Support for "Extra Generators" like CodeBlocks is deprecated and will be removed from a future version of CMake. IDEs may use the cmake-file-api(7) to view CMake-generated project build trees. -- The CXX compiler identification is unknown CMake Error at CMakeLists.txt:3 (project): The CMAKE_CXX_COMPILER: cl is not a full path and was not found in the PATH. To use the JOM generator with Visual C++, cmake must be run from a shell that can use the compiler cl from the command line. This environment is unable to invoke the cl compiler. To fix this problem, run cmake from the Visual Studio Command Prompt (vcvarsall.bat). Tell CMake where to find the compiler by setting either the environment variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH. -- Configuring incomplete, errors occurred! CMake process exited with exit code 1. Elapsed time: 00:00.
I've searched for Google that I can use
cmake -G "Visual Studio 17 2022"
to build. But how can I change the ""-GCodeBlocks - NMake Makefiles JOM"" in the first line of error? Or how can I fix this error? Thanks in advance.
-
C Christian Ehrlicher moved this topic from Installation and Deployment on
-
When I start a new project, it started by trying to compile the project, and I got the below error.
Which IDE? QtCreator? Visual Studio (Code) or something else?
-
@Christian-Ehrlicher QT Creator, btw I solved by changing the CMake generator in project -> manage kits -> kits :D
-