Windows.h has just dissappeared!?

Started by
10 comments, last by Ubermeowmix 10 years, 7 months ago

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.

If you get near a point, make it!
Advertisement

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).

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

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.

FastCall22: "I want to make the distinction that my laptop is a whore-box that connects to different network"

Blog about... stuff (GDNet, WordPress): www.gamedev.net/blog/1882-the-cuboid-zone/, cuboidzone.wordpress.com/

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 :(

If you get near a point, make it!

Hasnt all of this been moved into the Windows SDK?

http://www.microsoft.com/en-us/download/details.aspx?id=8279

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

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

best regards

something kicks me in the nuts and stops me dead sad.png

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

FastCall22: "I want to make the distinction that my laptop is a whore-box that connects to different network"

Blog about... stuff (GDNet, WordPress): www.gamedev.net/blog/1882-the-cuboid-zone/, cuboidzone.wordpress.com/

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.
If you get near a point, make it!

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
If you get near a point, make it!

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).

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

Try re-downloading the windows SDK, and do please check your project dependencies!

FastCall22: "I want to make the distinction that my laptop is a whore-box that connects to different network"

Blog about... stuff (GDNet, WordPress): www.gamedev.net/blog/1882-the-cuboid-zone/, cuboidzone.wordpress.com/

This topic is closed to new replies.

Advertisement