Unsolved Project ERROR: Cannot run compiler 'g++'. Output:
-
Hi @jksh, here is the screenshot of the Build Environment settings.
These are the values from the Path variable:
C:\Qt\Tools\mingw730_32\bin;
C:\Qt\5.12.4\mingw73_32\bin;
C:\Qt\Tools\mingw730_32\bin;
C:\Program Files (x86)\Common Files\Oracle\Java\javapath;
C:\WINDOWS\system32;
C:\WINDOWS;
C:\WINDOWS\System32\Wbem;
C:\WINDOWS\System32\WindowsPowerShell\v1.0;
C:\Program Files\Git\cmd;
C:\Program Files\Microsoft SQL Server\110\Tools\Binn;
C:\Program Files\PuTTY;
C:\Program Files\TortoiseGit\bin;
C:\WINDOWS\System32\OpenSSH;
C:\Python27;
C:\Program Files\TortoiseSVN\bin;
C:\Program Files (x86)\Java\jre1.8.0_191\bin\client;
C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn;
C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn;
C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn;
C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio;
C:\Program Files\Intel\WiFi\bin;
C:\Program Files\Common Files\Intel\WirelessCommon;
C:\Program Files\nodejs;
C:\Program Files\Java\jre1.8.0_191\bin\server;
C:\Program Files\Java\jdk1.7.0_80\bin;
C:\Users\User\AppData\Roaming\npmThe odd thing was that when I've first installed and created the project, I could run it without any problems using qmake. A few hours later, this problem happened.
-
@joseph_ho said in Project ERROR: Cannot run compiler 'g++'. Output::
The odd thing was that when I've first installed and created the project, I could run it without any problems using qmake. A few hours later, this problem happened.
I can't see what's causing the problem, sorry.
- Does it also happen if you use the MinGW 64-bit kit?
- Does it also happen if you use a different Windows account to run Qt Creator?
-
@JKSH, apologies for the late reply.
In regard to your 2 suggestions:-
How do I run/test the MinGW 64-bit kit without running the Qt Creator?
-
I've downloaded & installed Qt Creator on another computer, and it worked without any problems there. This was done after the aforementioned problems started.
-
-
@joseph_ho said in Project ERROR: Cannot run compiler 'g++'. Output::
How do I run/test the MinGW 64-bit kit without running the Qt Creator?
In a terminal. Call
qmake.exe mingw32-make.exe
You can open a terminal using the shortcut created during Qt installation (doing so you make sure the environment is set up properly).
-
@jsulm Do you mean like this?
I've recently switched over to Qt Creator 4.8.2 (Enterprise) but still experiencing the same problems.
I'm starting to suspect there might be caused by some corrupted leftover files or registries. -
@joseph_ho You need to do these calls in your PROJECT directory...
-
@jsulm Is it like this?
-
@joseph_ho Yes, but please use full paths to qmake and make.
Also, you should use the command prompt from MinGW (you will find it in Windows start menu). You then will have ready made environment where you can call wmake/make without using full path. -
@jsulm It is this, right?
-
@joseph_ho said in Project ERROR: Cannot run compiler 'g++'. Output::
It is this, right?
Apparently not!
Why do you call make/qmake inside the MinGW installation directory?! We actually already clarified that.
You need to call it inside your project/build directory (from where you called qmake). -
@jsulm could you provide an example? I'm really confused by all this
-
cd YOUR_PROJECT_DIR PATH_TO_YOUR_QMAKE/qmake.exe PATH_TO_YOUR_MAKE/mingw32-make.exe
-
@jsulm its something like this, is it?
-
@joseph_ho You should use the command prompt from MinGW installation, then the environment will be setup and ready.