(Project ERROR: Cannot run compiler 'g++'. Output:) Question about error occurrence during MySql driver installation.
-
I've been following and seeing various documentation for mysql connection.
but I can't connect yet, so I'm going to look at the official documentation and try to follow it step by step.(https://doc.qt.io/qt-5/sql-driver.html)At the beginning of the document is the following:
Just like this, when I run it, the following error occurs.
"Project ERROR: Cannot run compiler 'g++'. Output:"
What environment changes do I need to change to resolve this error? -
You've installed all you need (and more) but instead the problem (as @Christian-Ehrlicher says) to find the MinGW stuff.
One way you could try:
In your CMD window, before doing *qmake... type
C:\Qt\5.13.2\mingw73_64\bin\qtenv2.bat
and then you have to cd back
cd C:\Qt\5.13.2\Src\qtbase\src\plugins\sqldrivers
then try that qmake command again... -
@dennis-kim said in (Project ERROR: Cannot run compiler 'g++'. Output:) Question about error occurrence during MySql driver installation.:
What environment changes do I need to change to resolve this error?
You have to make sure that g++ is in your PATH. When you installed Qt via the Maintainance Tool there is a command shortcut in your start menu which sets this up for you ('Qt 5.X.Y (MinGW ...)'
-
@Christian-Ehrlicher
thanks a lot, Christian.I have now accessed the maintenance tool.
And the compiler I am using is MinGW 64bit version with Qt 5.13.2.
All items are checked in the maintenance window.
Can you tell me what more items I need to check? -
You've installed all you need (and more) but instead the problem (as @Christian-Ehrlicher says) to find the MinGW stuff.
One way you could try:
In your CMD window, before doing *qmake... type
C:\Qt\5.13.2\mingw73_64\bin\qtenv2.bat
and then you have to cd back
cd C:\Qt\5.13.2\Src\qtbase\src\plugins\sqldrivers
then try that qmake command again... -
@hskoglund
wow!! thank you very much..
I think I can move on to the next step now.