11

The warning I get is: "Qt Cmake configuration has no path to a C++ compiler set, even though the toolkit has a valid tool chain."

I am not sure how to change the CMake configuration so that it has a path to the compiler. I do have a C++ compiler installed as it works with VS but Qt seems to run into some problem.

This is a screen shot of what appears as the warning: https://i.stack.imgur.com/ETET6.jpg

This is the error I get trying to run anything:

jom: C:\Users\User\Desktop\inv\build-Invaders-Desktop_Qt_5_8_0_MSVC2015_64bit-Debug\Makefile.Debug [debug\game.obj] Error 1
'cl' is not recognized as an internal or external command,
operable program or batch file.
jom: C:\Users\User\Desktop\inv\build-Invaders-Desktop_Qt_5_8_0_MSVC2015_64bit-Debug\Makefile.Debug [debug\spaceship.obj] Error 1
'cl' is not recognized as an internal or external command,
operable program or batch file.
jom: C:\Users\User\Desktop\inv\build-Invaders-Desktop_Qt_5_8_0_MSVC2015_64bit-Debug\Makefile.Debug [debug\laserbeam.obj] Error 1
'cl' is not recognized as an internal or external command,
operable program or batch file.
'cl' is not recognized as an internal or external command,
operable program or batch file.
jom: C:\Users\User\Desktop\inv\build-Invaders-Desktop_Qt_5_8_0_MSVC2015_64bit-Debug\Makefile.Debug [debug\config.obj] Error 1
jom: C:\Users\User\Desktop\inv\build-Invaders-Desktop_Qt_5_8_0_MSVC2015_64bit-Debug\Makefile.Debug [debug\iofile.obj] Error 1
jom: C:\Users\User\Desktop\inv\build-Invaders-Desktop_Qt_5_8_0_MSVC2015_64bit-Debug\Makefile [debug] Error 2
17:06:30: The process "D:\Qt\Tools\QtCreator\bin\jom.exe" exited with code 2.
Error while building/deploying project Invaders (kit: Desktop Qt 5.8.0 MSVC2015_64bit)
The kit Desktop Qt 5.8.0 MSVC2015_64bit has configuration issues which might be the root cause for this problem.
When executing step "Make"
Chnossos
  • 9,971
  • 4
  • 28
  • 40
Shubby
  • 131
  • 1
  • 5
  • Do you have Visual Studio 14 2015 installed? The fact that it cannot find `cl` means that it doesn't have the correct path to the compiler. – rwols May 11 '17 at 07:26
  • @rwols yes, i have VS2015 installed, I ran a "Hello World" program on VS2015 as a C++ console app and it ran normally. – Shubby May 11 '17 at 08:04
  • Did you set the CMAKE_PREFIX_PATH variable to point to QT? (or added the qt directory to it if it was already set) – cantSleepNow May 11 '17 at 17:44
  • @cantSleepNow Im not sure how that works, but this is what written in that field: `CMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX}` – Shubby May 11 '17 at 18:22
  • Ok I'm talking about the environment variable - try setting it to where QT is located. Don't forget to exit and enter the app (QT Creator?), since windows does not "notify" about environment variable creations or updates – cantSleepNow May 11 '17 at 18:31
  • 1
    Did you ever solve this? Running into the same issue. – D. Foley May 02 '18 at 10:28
  • It's been a while, but I don't think I ever solved it. I think I just moved to Linux instead. – Shubby Jun 16 '18 at 06:30
  • I am running into a similar problem, but I am using Ubuntu, not Windows, and it says there is no path to a C (not C++) compiler. I don't believe the vsvars32.bat exists on my operating system. Any help would be much appreciated. – Frank Tocci Oct 14 '18 at 01:26
  • 1
    Found a solution here https://developernote.com/2021/09/how-i-fixed-cmake-configuration-has-no-path-to-c-compiler-in-qt-creator/. changing `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat` with `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsx86_arm64.bat`. – Alexey Starinsky Sep 29 '21 at 11:28

1 Answers1

2

After running following file & restart qt creator warning and error get resolved. Please run vsvars32.bat file in tools of Visual studio 14.0

Directory Path : C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools Mostly this issue come after update of visual studio tools.

Deepak Patel
  • 464
  • 1
  • 3
  • 17