I'm trying to learn DirectX 11 and currently working on lighting. I need to add a Directional light to the scene, but when I set up my LightHelper.h file, it refuses to compile. It throws the error X1507 "failed to open source file: Windows.h".
I've tried uninstalling the Windows SDK and reconfiguring some of the include options to no avail. Here is my code for the header file.
#pragma once
#include <Windows.h>
#include <DirectXMath.h>
struct DirectionalLight
{
DirectionalLight()
{
ZeroMemory(this, sizeof(this));
}
DirectX::XMFLOAT4 Ambient;
DirectX::XMFLOAT4 Diffuse;
DirectX::XMFLOAT4 Specular;
DirectX::XMFLOAT3 Direction;
float Pad;
};
struct Material
{
Material()
{
ZeroMemory(this, sizeof(this));
}
DirectX::XMFLOAT4 Ambient;
DirectX::XMFLOAT4 Diffuse;
DirectX::XMFLOAT4 Specular;
DirectX::XMFLOAT4 Reflect;
};
This isn't the only header file (of course) with Windows.h, but all of the others link with no issues... I've been trying to figure it out for a couple days now. It's rather annoying.
Thanks
Edit: These are the solutions I tried.
I also tried finding the direct file path in "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include\". It just threw another error about not being able to include another header from Windows.h. I think it was "excpt.h"