KDABLabs / blog-vscode-template

vscode template for C++ projects (Cross referenced by the blog, do not delete)
MIT License
24 stars 6 forks source link

Bad CMake executable #2

Open Maniumn opened 3 months ago

Maniumn commented 3 months ago

I have added following environments to local user environments: QTDIR=C:\Qt_v2\6.7.0\msvc2019_64\ Path+=C:\Qt_v2\6.7.0\msvc2019_64\bin

Started VSCode, installed all extensions required from extensions.json, now I get following error. CMake Tools (Extension) throws this error: Bad CMake executable: "". Check to make sure it is installed or the value of the "cmake.cmakePath" setting contains the correct path

Maniumn commented 3 months ago

After installing CMake 3.29.4 as standalone with user environment path I get following output on building:

[main] Configuring project: blog-vscode-template 
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Debug -SC:/Users/USER_NAME/src/blog-vscode-template -BC:/Users/USER_NAME/src/blog-vscode-template/build-debug -G Ninja
[cmake] CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
[cmake] CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
[cmake] -- Configuring incomplete, errors occurred!
[proc] The command: "C:\Program Files\CMake\bin\cmake.EXE" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Debug -SC:/Users/USER_NAME/src/blog-vscode-template -BC:/Users/USER_NAME/src/blog-vscode-template/build-debug -G Ninja exited with code: 1
iamsergio commented 3 months ago

Hi, you need ninja installed and in PATH

Maniumn commented 2 months ago

Now VSCode shows

CMake Error at CMakeLists.txt:3 (project):No CMAKE_CXX_COMPILER could be found.

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.

Looks like Visual Studio should be installed?