[Windows Build] "CMake Error: CMAKE_CXX_COMPILER not set"

Hey guys, hope you all are doing fine today.

I’m “messing around until I find out” here in Cocos Creator and currently I’m doing a small exploration trying to do a Native Windows build but failing so far.

I’ve followed the docs and tried to find some information, but after following all I could find, I’m still struggling to understand how to properly set up this build step.

Below is an example of the error I’m getting in this image. Looking at the CMakeLists.tx file I can’t really find any of those references… Do you would have any idea what I’m missing here?

This was solved by:

  • Reinstalling the VS 2022 environment
  • Restarting the PC
  • Deleting all build configurations and caches
  • Creating a new build configuration.