无法打开源文件" windows.h" " WTypes.h"

时间:2016-09-20 02:13:37

标签: c++ windows

您好,感谢您的帮助。 我最近用C ++下载了一些源文件。他们构建了一个用于管理摄像头的DLL。 无论如何,当使用Visual Studio 2015打开时,它会通知我将进行一些转换,因为编译器已更改。 之后

下面有红线
#include <windows.h>
#include <WType.h>

将鼠标移到它们上面说“#34;无法打开源文件...&#34;

现在,我搜索了这个错误并找到了一些资源,即使是在同一个网站上也是如此。 但是他们的解决方案不起作用。有时OP只是说&#34;哦,它工作谢谢!&#34;但没有说明是什么使它起作用。

所以我在这里要求一些帮助。这是什么错误,如何解决? (我假设它涉及项目中的一些设置)

再次感谢所有帮助

(p.S。我有作者提供的dll,但我想自己建立这个项目)

编辑: 构建输出消息时

    1>------ Build started: Project: DirectShowFacade, Configuration: Debug Win32 ------
1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Win32\PlatformToolsets\v140_xp\Toolset.targets(36,5): warning MSB8003: Could not find WindowsSdkDir_71A variable from the registry.  TargetFrameworkVersion or PlatformToolset may be set to an invalid version number.
1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(366,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry.  TargetFrameworkVersion or PlatformToolset may be set to an invalid version number.
1>  DirectShowFacade.cpp
1>d:\xxxxxxxxxxxxxxxx\cameraprogramming\directshowfacadesources\directshowfacade.h(28): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory

1 个答案:

答案 0 :(得分:4)

属性→常规→目标平台版本→更改为8.1

相关问题