卸载了原来的Qt,换了版本之后!! 安装Qt报错:Cmake configuration has no path to a C++ compiler set

img


【报错信息】Cmake configuration has no path to a C++ compiler set, even though the toolkit has a valid tool chain.
尝试了以下几种方法都没能解决:
【1】解决方案1——
Qt 环境配置提示警告Qt Cmake configuration has no path to a C++ compiler set, even though the toolkit has a v_承泓风的博客-CSDN博客_cmake configuration has no Qt->tools->Kits里面的配置报警告:Qt Cmake configuration has no path to a C++ compiler set, even though the toolkit has a valid tool chain解决方案:运行下面目录下的vsvars32.bat脚本或者VsDevCmd.batC:\Program Files (x86)\Microsoft Visual Studio V.w\Common7\Tools关于这个脚本的介绍 https://blog.csdn.net/cOnhthefroad/article/details/111043757

运行下面目录下的vsvars32.bat脚本或者VsDevCmd.bat
C:\Program Files (x86)\Microsoft Visual Studio V.w\Common7\Tools.
运行后闪退了,依然没有解决问题。

【2】解决方案2——


I fixed this by changing C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat with C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsx86_arm64.bat.
运行了还是没反应。
我的是vs2017,按照方案2的思路,对应的是C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsx86_amd64.bat

【3】解决方案3——配置环境变量,确认没问题。

img

但是都没能解决问题,求助!!版本信息:Qt 5.9.1 + Qt Creator 4.3.1 +vs2017_64bit

如果运行代码,报错信息就是:-1: error: Cannot run compiler 'cl'. Maybe you forgot to setup the environment?

遇到同样问题 题主解决了吗

Cmake配置没有到c++编译器集的路径
Cmake configuration has no path to a C++ compiler set
我用翻译 翻译的

重装c++啥的,然后再试

用管理员运行,我是用的解决方案1,然后管理员cmd进去到对应文件夹下面,然后运行的bat。
我觉着直接管理员运行bat应该也可以