Sign in to follow this  
wraith811

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 this post


Link to post
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 this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this