I use VS2017 to build some c++ projects and it goes successfully. When I build some libraries with MSBuild
, cl
or qt-creator with msvc tools , there are always errors of "can not open include file",and these missing include files all locate in Windows Kit
, such as:
e:\workspace\boost_1_70_0\tools\build\src\engine\jam.h(71): fatal error C1083: can not open include file: "ctype.h": No such file or directory
e:\workspace\boost_1_70_0\tools\build\src\engine\strings.h(11): fatal error C1083: can not open include file: "stddef.h": No such file or directory
order.c
e:\workspace\boost_1_70_0\tools\build\src\engine\modules\../mem.h(67): fatal error C1083: can not open include file: "stdlib.h": No such file or directory
I have searched for solutions and finally find one for qt: when I add the following two lines, qt-creator with msvc tools can build successfully:
win32 {
INCLUDEPATH += "F:\\Windows Kits\\10\\Include\\10.0.17763.0\\ucrt\\"
LIBS += -L"F:\\Windows Kits\\10\\Lib\\10.0.17763.0\\ucrt\\x86\\"
}
and for this, I have checked user.props
:
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets">
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup />
<ItemGroup />
</Project>
It is obviously that something went wrong with WindowsSDKVersion
, WindowsSDK_IncludesPath
, WindowsSDK_LibraryPath
or something else about Windows SDK. But this prombles dosen't exist until this year. I have no ideal what happend.
Is there any way to correct WindowsSDK_IncludesPath
and WindowsSDK_LibraryPath
, or at least make it possible to use msbuild and cl?