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.bat
C:\Program Files (x86)\Microsoft Visual Studio V.w\Common7\Tools
关于这个脚本的介绍:
VsDevCmd.bat sets the Visual Studio related environment variables that are necessary for compiling, linking and building applications on the command line.
VsDevCmd.bat is new with Visual Studio 2017 and replaces vsvars32.bat that came with Visual Sutido 2015 and earlier version.
vsvars32.bat was (by default) located under C:\Program Files (x86)\Microsoft Visual Studio V.w\Common7\Tools.
When invoked with no parameters, the script sets the environment and the host and target build architecture to use the 32-bit x86-native tols to build 321-bit x86 code.
翻译过来就是:
VsDevCmd.bat设置Visual Studio 相关的环境变量,这些变量是编译、链接和构建命令行上的应用程序所必需的。
vs2017之后使用的都是VsDevCmd.bat
vs2015及以前使用的是vsvars32.bat
参考链接:
1.Qt Cmake configuration has no path to a C++ compiler set
2.VsDevcmd.bat