I'm having a difficult time installing Qt on Windows 10 with MinGW. I've reinstalled about 20 times so far and have read countless posts on this forum but to no avail. The error I'm is Cannot run compiler g++
, even though it was installed and QtCreator seemed to auto detect it.
To make things easier to understand I'm going to reinstall again to show my settings etc during installation.
So right now I have no Qt installed, and no MinGW. No GCC, or G++. As can be confirmed on the command line:
![0_1564232980551_82fc6565-12b4-4e02-ba9f-7a856149bf54-image.png]()
So next up I run the offline installer:
![0_1564233098768_44f4dbf3-1872-4751-bb71-c08317c412c1-image.png]()
And ...
![0_1564233122710_7929e600-71f3-4cde-b144-0552ee22f83b-image.png]()
I skip the account login bit and select the following directory to install
![0_1564233186468_a364182e-e427-43f2-a507-16d9067958de-image.png]()
I select the following components
![0_1564233244223_e968af5f-de9a-4eb2-8ee7-b262c2d81548-image.png]()
And
![0_1564233270626_33ee67f4-4d38-49cc-8ce4-cb3f648f7342-image.png]()
After that I proceed with the installation. Once complete I add the following paths to my environment PATH
variable. (I'm not actually sure if I need both 32bit and 64bit. I assume the compiler needs either depending on whether compiling for 32 or 64 bit).
When I open the terminal they're loading correctly:
![0_1564238818480_ae201799-2ecb-4f86-b630-5001f0f04cfd-image.png]()
Next up I load QtCreator and open the clock example:
![0_1564238893967_0015fc84-f1da-4134-8c2b-0c91103603e7-image.png]()
I click on each kit to activate them. For some reason the build path is red.
![0_1564238997758_ca2eda6f-a32c-4fe7-ad58-b9075312f3ab-image.png]()
And if I attempt to run I get the following error:
![0_1564239032506_4ccf2399-88df-4738-868b-29ac3b0bc5bb-image.png]()
The detailed error is:
15:50:07: Running steps for project analogclock...
15:50:07: Starting: "C:\Qt\Qt5.12.4\5.12.4\mingw73_32\bin\qmake.exe" C:\Qt\Qt5.12.4\Examples\Qt-5.12.4\gui\analogclock\analogclock.pro -spec win32-g++ "CONFIG+=debug" "CONFIG+=qml_debug"
'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?
15:50:07: The process "C:\Qt\Qt5.12.4\5.12.4\mingw73_32\bin\qmake.exe" exited with code 3.
Error while building/deploying project analogclock (kit: Desktop Qt 5.12.4 MinGW 32-bit)
When executing step "qmake"
15:50:07: Elapsed time: 00:00.
The kit looks to be fine:
!
and
![0_1564239256322_9930599f-f54d-4e66-8160-eb3097f05d19-image.png]()
and
![0_1564239282425_db04edb6-e636-44c1-9342-2f31d3ba8cd5-image.png]()
Can anyone help me figure out what's going on? I've tried for weeks to get this working before asking for help. I just can't seem to get it to run correctly.