KansaiRobot
KansaiRobot

Reputation: 10032

cannot open source file "windows.h" "WTypes.h"

Hello and thanks for your help. I recently downloaded some source files in C++. They build a DLL for managing a camera. Anyway, when opening with Visual Studio 2015, it notifies me there will be some conversion because the compiler has changed. After that there are red lines under

#include <windows.h>
#include <WType.h>

passing the mouse over them it says "cannot open source file ..."

Now, I ve googled this error and found some resources, even in this very same site. However their solutions don't work. Sometimes the OP just say "Oh it worked thanks!" but does not specify what makes it work.

So I am asking for some help here. What is this error and how can I solve it? (I am supposing it involves some settings in the project)

Thanks again for all the help

(p.S. I have the dlls provided by the writer but would like to build the project myself)

Edit: When building the output messages are

    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

Upvotes: 1

Views: 6684

Answers (1)

user7287505
user7287505

Reputation:

Properties → General → Target Platform Version → change to 8.1

Upvotes: 4

Related Questions