# DX11 Windows.h has just dissappeared!?

This topic is 2147 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I was coding some simple demo's, and then all of a sudden it came up with the following errors:

1>------ Build started: Project: Blank Direct3D, Configuration: Debug Win32 ------
1>  main.cpp
1>c:\users\Me\blank direct3d\blank direct3d\main.cpp(1): fatal error C1083: Cannot open include file: 'Windows.h': No such file or directory
1>  DX11DemoBase.cpp
1>c:\program files (x86)\microsoft directx sdk (june 2010)\include\d3d11.h(27): fatal error C1083: Cannot open include file: 'rpc.h': No such file or directory
1>  Generating Code...
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I cannot reinstall DirectX as it fails everytime, and yes I've redownloaded the install file twice now.

What the Hell is going on, I did one demo using #include <Windows.h> that worked fine, now it's fallen on it's arse.

##### Share on other sites

Have you tried rebooting? It's possible your environment variables got overwritten or deleted somehow, which would lead to your compiler no longer locating particular headers. Rebooting should restore them to a correct state. If that fails, perform a global search on windows.h, rpc.h, etc.. on your hard drive to see what happened exactly, and report.

Less dramatically, maybe your IDE settings got corrupted (if you're using visual studio, it has some default search paths in which to find system headers, check in your project properties that they didn't get wiped for some reason).

##### Share on other sites

In the newer versions of Visual C++, they are replacing the headers with newer versions.

I think Windows.h is now just Windows:

#include <Windows>


At least with me it is.

##### Share on other sites

Rebooting did nothing, it seems only directX referenced files are showing up so I am uninstalling and reinstalling Visual studio and the DirectX SDK. It happened after I ran the code for a simple DirectX11 window. Was working fine then everything just dissappeared :S

Will let you know if it works, it's bloody frustrating. Everytime I have the time to really get going on a project, something kicks me in the nuts and stops me dead :(

##### Share on other sites

Hasnt all of this been moved into the Windows SDK?

Search for it, either Windows 7 or Windows 8 SDK's available.

download and install it, maybe it's something like that.

best regards

##### Share on other sites

something kicks me in the nuts and stops me dead

I know the feeling, sometimes, stuff just doesn't work...

Edited by Migi0027

##### Share on other sites
Okay re-installation of both DirectX SDK's x86 & x64 and also Visual studio 2010 re-installation has left me with *expletives deleted* all to show for it! What the hell is going on, could it be my hard drive is on the way out? I don't get it.

##### Share on other sites

I think Windows.h is now just Windows:

#include &lt;Windows&gt;

Nope neither show up in the auto complete drop down box, it's weird, checked the folders and the files seem to be missing :S

##### Share on other sites

Okay re-installation of both DirectX SDK's x86 & x64 and also Visual studio 2010 re-installation has left me with *expletives deleted* all to show for it! What the hell is going on, could it be my hard drive is on the way out? I don't get it.

At this point perhaps this would be worth considering. I am still leaning towards a software issue, but maybe you should test the hard drive to see if it isn't failing (now would also be a good time to verify your backup system works.. if you have backups worth saving, that is).

• 9
• 17
• 10
• 11
• 18