4

When I run windeployqt to deploy my application, I get the following warning:

Warning: Cannot find GCC installation directory. g++.exe must be in the path.

Even though I have set the Path environment variable to include the Qt's MinGW binary files located at C:\Qt\Qt5.12.0\5.12.0\mingw73_64\bin. As a result, I can see that the compiler runtime libraries are not included in the deployed package, even when I explicitly use --compiler-runtime flag. I am not sure what step I am missing?

today
  • 32,602
  • 8
  • 95
  • 115

1 Answers1

5

The problem is that you should also install MinGW compiler when installing the Qt (to do so, check "MinGW compiler" under the "tools" section in installation wizard) and then add its path to the Path environment variable:

C:\Qt\Qt5.12.0\Tools\mingw730_64\bin

That's where all the related compiler binaries, including g++, are located. Also, don't forget that you may need to reboot the computer after setting the path.

today
  • 32,602
  • 8
  • 95
  • 115