Qt Creator无法打开包括文件: “corecrt.h”: No such file or directory”

INCLUDEPATH += "C:/Program Files (x86)/Windows Kits/10/Include/10.0.10240.0/ucrt"
LIBS += -L"C:/Program Files (x86)/Windows Kits/10/Lib/10.0.10240.0/ucrt/x86"

Qt Creator无法打开包括文件: “corecrt.h”: No such file or directory”_第1张图片

2.修改D:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools文件下的vcvarsqueryregistry.bat文件(一劳永逸):

-- vcvarsqueryregistry.bat     Thu Mar 17 22:24:58 2016
+++ vcvarsqueryregistry.bat     Thu May 05 12:48:58 2016
@@ -351,7 +351,10 @@
 @setlocal enableDelayedExpansion
 @for /f %%i IN ('dir "%UniversalCRTSdkDir%include\" /b /ad-h /on') DO (
     @set result=%%i
-    @if "!result:~0,3!"=="10." set CRT=!result!
+    @set resultcrt=
+    @if "!result:~0,3!"=="10." set resultcrt=!result!
+    @if not EXIST "%UniversalCRTSdkDir%include\!result!\ucrt" set resultcrt=
+    @if not "!resultcrt!"=="" set CRT=!result!
     @if "!result!"=="%user_inputversion%" set match=1
 )
 @if not "%match%"=="" set CRT=%user_inputversion%
其中“-”为删去原来文件里面的改行,“+”为增加的内容

你可能感兴趣的:(QT)