Unable to determine what CMake generator to use. Please install or configure a preferred generator, or update configuration settings

Viewed 71

I just want to be able to compile/run my OpenGL C++ projects on my local machine.

  • Do I need "nRF Connect" if I'm only pursuing local projects?
  • I have VS Code installed running version 1.71.0 (user setup) on Windows_NT x64 10.0.22000
  • I am using the mingw64 compiler located in C:\msys64\mingw64\bin\g++.exe
  • My active kit is GCC 12.1.0 x86_64-w64-mingw64 that is displayed on the bottom faceted pane in the window
  • I have my "CMakeList.txt" generated with the corresponding "main.cpp" file using the "CMake: Quick start" tool
  • When I run the "CMake: Build" tool, I get the error "Unable to determine what CMake generator to use". Therefor my CMake "build" directory is never created in my $(workspace)

I have tried running the "CMake: Reset" tool and I don't think that is the problem right now. In my "settings.json" file at the bottom, I see "nrf-connect.toolchain.path: " setting is set to the value "PATH". I think that is one of the issues but don't know what value to change it too. Also my environment variable "Cmake: Configure Environment" located in settings->Extensions->CMake Tools is empty for my key/value pair, also don't know what to add to that as well. I've been combing the internet for weeks so I can articulate my problem to you guys which as much of it solved before I brought the issue here. I was able to compile/run my C++ projects on VS code with no issue prior to installing CMake but am trying to build projects with OpenGL. And from what I seen CMake is one of the options that is required when it comes to building OpenGL projects.

Don't send me some documentation as a solution because I tried it and that is why I'm here. It blows my mind that there isn't a step by step on how to integrate CMake with OpenGL in VS code. The tutorials I've seen, they skip a lot of crucial steps which is the dumbest thing I have ever seen and it leaves us pulling our hair out.

CMake: Configure Environment setting

0 Answers
Related