“警告:找不到GCC安装目录.g ++.exe必须在路径中."使用windeployqt时 [英] "Warning: Cannot find GCC installation directory. g++.exe must be in the path." when using windeployqt

查看:471
本文介绍了“警告:找不到GCC安装目录.g ++.exe必须在路径中."使用windeployqt时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行 windeployqt 部署我的应用程序时,收到以下警告:

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.

即使我已将 Path 环境变量设置为包括位于 C:\ Qt \ Qt5.12.0 \ 5.12.0 \ mingw73_64 \ bin 的Qt的MinGW二进制文件>.结果,即使我显式使用-compiler-runtime 标志,我也可以看到编译器运行时库未包含在已部署的程序包中.我不确定我缺少哪一步?

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?

推荐答案

问题是,在安装Qt时,您还应该安装MinGW编译器(为此,请在安装向导的工具"部分下检查"MinGW编译器"),然后将其路径添加到 Path 环境变量:

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

这是所有相关的编译器二进制文件(包括 g ++ )所在的位置.另外,请不要忘记设置路径后可能需要重新启动计算机.

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.

这篇关于“警告:找不到GCC安装目录.g ++.exe必须在路径中."使用windeployqt时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆