error windows.h
Sorry, if this is posted somewhere; however, I have looked and nothing seems to solve my issue. This is my code:
//Beginning Game Programming, 2nd Edition
//Chapter 1 - HelloWorld Program
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
MessageBox(NULL, "Motoko Kusanagi has hacked your system!", "Public Security Section 9", MB_OK | MB_ICONEXCLAMATION);
}
and I get the c1083 error.
Could someone help me by telling me possible solutions and ways to ensure that my path to the header file is not blocked. I'm am using VS2008 pro edition with windows sdk aug 2009.
If you need more info let me know. Thanks,
Dave the humble novice programmer.
The message is:
Error 1 fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
Thanks.
Error 1 fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
Thanks.
Did you install the windows SDK?
http://msdn.microsoft.com/en-us/windows/bb980924.aspx
edit: oh, you said in your post that you did... did it correctly set up the include paths in visual studio? ( tools > options > projects and solutions > VC++ directories )
http://msdn.microsoft.com/en-us/windows/bb980924.aspx
edit: oh, you said in your post that you did... did it correctly set up the include paths in visual studio? ( tools > options > projects and solutions > VC++ directories )
This is what is in the include file in the VC++ directories:
$(VCInstallDir)include
$(VCInstallDir)PlatformSDK\include
$(VCInstallDir)atlmfc\include
I must admit that I might have deleted a few items trying to solve another problem. I recently added the SDK include so I'm not even sure that's correct.
Thanks.
$(VCInstallDir)include
$(VCInstallDir)PlatformSDK\include
$(VCInstallDir)atlmfc\include
I must admit that I might have deleted a few items trying to solve another problem. I recently added the SDK include so I'm not even sure that's correct.
Thanks.
Try reinstalling the SDK, you're missing the include paths to the windows sdk, which isn't under VCInstallDir
Also, this is a bit strange because it claims in comments to be a Hello World program, but it clearly isn't.
Unfortunately, I tried that already. I even uninstalled VS2008 and to no avail. Not to mention all the entries in the uninstall location that has SDK written in the titles. Well, I'll give it another try. Any suggestions on which SDK to uninstall? Is there a way I can just type in the missing entries (assuming I can find that info)?
Thanks.
Thanks.
In a first time, try to write the full path :
#include "C:\\folder01\\folder02\\.....\\windows.h"
(to give you an idea, on my PC it's C:\Program Files\Microsoft SDKs\Windows\v7.0\include\Windows.h)
#include "C:\\folder01\\folder02\\.....\\windows.h"
(to give you an idea, on my PC it's C:\Program Files\Microsoft SDKs\Windows\v7.0\include\Windows.h)
Your VC++ include directories should have an entry like this:
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include
Of course, you should replace this with the path that you installed the Platform SDK on. $(VCInstallDir)PlatformSDK\include is almost certainly not correct.
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include
Of course, you should replace this with the path that you installed the Platform SDK on. $(VCInstallDir)PlatformSDK\include is almost certainly not correct.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement