# error windows.h

## Recommended Posts

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.

##### Share on other sites
Please post the exact and complete error message you're seeing.

##### Share on other sites
The message is:

Error 1 fatal error C1083: Cannot open include file: 'windows.h': No such file or directory

Thanks.

##### Share on other sites
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 )

##### Share on other sites
This is what is in the include file in the VC++ directories:

$(VCInstallDir)include$(VCInstallDir)PlatformSDK\include

##### Share on other sites
That worked! Thanks for the help guys! I hope karma brings you everything you want for Christmas!

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account

• ### Forum Statistics

• Total Topics
628329
• Total Posts
2982104

• 22
• 9
• 9
• 13
• 11