Project ERROR: Cannot run compiler 'g++'. Output
-
echo %PATH%
yields:C:\Program Files\Microsoft HPC Pack 2012\Bin\;C:\Python37\Scripts\;C:\Python37\;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\HashiCorp\Vagrant\bin;C:\Users\KraftWurk\drivers\chromedriver.exe;C:\Program Files\nodejs\;C:\tools\php73;C:\Qt\Qt5.12.4\Tools\mingw730_32\bin;C:\Qt\Qt5.12.4\Tools\mingw730_64\bin;C:\Users\KraftWurk\AppData\Roaming\Python\Python37\Scripts;C:\Users\KraftWurk\AppData\Local\Microsoft\WindowsApps;C:\Program Files\qemu;C:\Users\KraftWurk\AppData\Local\Programs\radare2;D:\win-bin\hugo;C:\Users\KraftWurk\AppData\Roaming\Composer\vendor\bin;C:\Program Files\7-Zip;C:\Program Files\ngrok;D:\masm32\bin;C:\php;C:\Users\KraftWurk\drivers\chromedriver.exe;C:\masm32\bin;C:\Users\KraftWurk\AppData\Roaming\npm;C:\Program Files (x86)\Dr. Memory\bin\;C:\Windows\System32;C:\tools\neovim\Neovim\bin;C:\lcc\bin;
-
You have both the 32 and 64 bit folders of MinGW in your PATH. Remove them both. Qt Creator will do the adjustment needed when using the selected kit.
-
Hi @z3ld4,
Please remove everything from your
PATH
exceptC:\Windows
andC:\Windows\System32
. It should be sufficent to do this in Qt Creators Build Environment for test purpose (in Projects mode, shortcut Ctrl+5).It is especially not needed to put the MinGW compilers in the PATH to use them from Creator. But your problem seems to be some other, incompatible shell (or make command), as
'C:\Users\KraftWurk\shell.bat' is not recognized as an internal or external command,
operable program or batch file.suggests.
By the way, the red build path just means the directory does not exist yet, that's no problem.
And everything else looks indeed correct.
Crossing fingers for you :)
-
Is this error related? I've just spotted this one:
C:/Qt/Qt5.12.4/5.12.4/mingw73_32/mkspecs/features/toolchain.prf(76): Variable QMAKE_CXX.COMPILER_MACROS is not defined. Project ERROR: failed to parse default search paths from compiler output Error while parsing file C:\Qt\Qt5.12.4\Examples\Qt-5.12.4\gui\analogclock\analogclock.pro. Giving up.
-
Same error. Full results:
Running Windows Runtime device detection. No winrtrunner.exe found. Running Windows Runtime device detection. No winrtrunner.exe found. Running Windows Runtime device detection. No winrtrunner.exe found. 'C:\Users\KraftWurk\shell.bat' is not recognized as an internal or external command, operable program or batch file. Project ERROR: Cannot run compiler 'g++'. Output: =================== # 1 "C:/Qt/Qt5.12.4/5.12.4/mingw73_32/mkspecs/features/data/macros.cpp" # 1 "<built-in>" # 1 "<command-line>" # 1 "C:/Qt/Qt5.12.4/5.12.4/mingw73_32/mkspecs/features/data/macros.cpp" QT_COMPILER_STDCXX = 201402L # 26 "C:/Qt/Qt5.12.4/5.12.4/mingw73_32/mkspecs/features/data/macros.cpp" QMAKE_GCC_MAJOR_VERSION = 7 QMAKE_GCC_MINOR_VERSION = 3 QMAKE_GCC_PATCH_VERSION = 0 =================== Maybe you forgot to setup the environment? Error while parsing file C:\Qt\Qt5.12.4\Examples\Qt-5.12.4\gui\analogclock\analogclock.pro. Giving up. 'C:\Users\KraftWurk\shell.bat' is not recognized as an internal or external command, operable program or batch file. Project ERROR: Cannot run compiler 'g++'. Output: =================== # 1 "C:/Qt/Qt5.12.4/5.12.4/mingw73_32/mkspecs/features/data/macros.cpp" # 1 "<built-in>" # 1 "<command-line>" # 1 "C:/Qt/Qt5.12.4/5.12.4/mingw73_32/mkspecs/features/data/macros.cpp" QT_COMPILER_STDCXX = 201402L # 26 "C:/Qt/Qt5.12.4/5.12.4/mingw73_32/mkspecs/features/data/macros.cpp" QMAKE_GCC_MAJOR_VERSION = 7 QMAKE_GCC_MINOR_VERSION = 3 QMAKE_GCC_PATCH_VERSION = 0 =================== Maybe you forgot to setup the environment? Error while parsing file C:\Qt\Qt5.12.4\Examples\Qt-5.12.4\gui\analogclock\analogclock.pro. Giving up.
-
@z3ld4 said in Project ERROR: Cannot run compiler 'g++'. Output:
Running Windows Runtime device detection.
No winrtrunner.exe found.But that's something new. You now seem to somewhere have a WinRT alias UWP kit selected.
As I said before: I'd start with installing exactly ONE Qt MinGW version (I recommend 32 bit) and ONE MinGW compiler. Nothing else.
Then make sure you eleminate everything unneeded from the
PATH
variable before starting Creator.Then create a new example (make sure nothing is left from previous attempts, especially no .pro.user and Makefiles).
Then
qmake
will generate Makefiles in the build folder, which in turn are used frommake
to generate your program.make
will call the compilers to compile and the linker to finally link your program. If any of these calls pick the wrong program from thePATH
, it will fail.We already know that something at this point went wrong, so if it still goes wrong we need to analyze the Makefiles. But I think that really has to do with some other program in your
PATH
.Regards
-
I had exactly the same problem with 5.13.1. Everything was set like on the screenshots above.
I also got the same errors when I tried 5.12.4.
After installing 5.13.1 again, nothing has changed. Still the same errors.A few days later, I noticed that I haven´t updated Windows 10 (x64) to 1903. I was still on 1809.
After the Windows update, QT has worked properly! I did not changed anything in the QT settings or the PATH variables.
I don´t know, if the windows path variables have caused the problem as only windows specific paths have been added after the update, but it´s worth a try:System Path variables before update:
C:\Program Files\CMake\bin
C:\Qt\Qt5.13.1\Tools\mingw730_32\binSystem Path variables after update:
C:\Program Files\CMake\bin
C:\Qt\Qt5.13.1\Tools\mingw730_32\bin
%SystemRoot%\system32
%SystemRoot%
%SystemRoot%\System32\Wbem
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0
%SYSTEMROOT%\System32\OpenSSH\