Jump to content
  • Advertisement
Sign in to follow this  
nooblet

windows.h

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Okay so I'm trying to work on a mod using Source SDK and VC2005 Express. I downloaded Platform SDK and I put all the directories in under Tools > Options, and I added user32.lib to the Linker > Input, but I'm still getting this error:
fatal error C1083: Cannot open include file: 'windows.h': No such file or directory

Share this post


Link to post
Share on other sites
Advertisement
How are you including the file?

#include "windows.h" will still generate an error even if the directory is included (I think)

#include <windows.h> will search for the file in the directories and subdirectories.

Share this post


Link to post
Share on other sites
#include <windows.h>

Well I got that fixed. Apparently it wasn't including the platform SDK like it should so I copied all of the include files into the VC/include folder. Now it's giving me this error:


fatal error LNK1181: cannot open input file 'winmm.lib'





EDIT AGAIN:

FIXED. I just copied the Lib folder over like I did with the include, works fine now.

Share this post


Link to post
Share on other sites
Quote:
Original post by nooblet
Well I got that fixed. Apparently it wasn't including the platform SDK like it should so I copied all of the include files into the VC/include folder. Now it's giving me this error:


You'd have been better to just add the SDK include and library folders to VS's search folders through Tools->Options->Projects and Solutions->VC Directories.

If MS ever decided to upgrade the SDK, you're going to have a hell of a time updating your installation.

As an easier alternative, if you upgrade to VS Express 2008, that installs with the Platform SDK by default and saves all this hassle. You still need to install the DXSDK though if you need DirectX, for which you need to add the include and lib directories as above.

Share this post


Link to post
Share on other sites
Quote:
Original post by Super Llama
How are you including the file?

#include "windows.h" will still generate an error even if the directory is included (I think)

#include <windows.h> will search for the file in the directories and subdirectories.




"windows.h" is fine, it's what I used. Personally i only use angled braces when including standard headers

Share this post


Link to post
Share on other sites
Quote:
"windows.h" is fine, it's what I used. Personally i only use angled braces when including standard headers
And with that statement, I urge you to learn about the difference in using quotes vs. angle brackets. It's not a stylistic difference.

Share this post


Link to post
Share on other sites
Quote:
Original post by godsenddeath
i'm aware of the difference
Then your compiler is broken and non standards-compliant (I.e. VC6), or you have some very weird directory setup.

Share this post


Link to post
Share on other sites
Quote:
Original post by Evil Steve
Quote:
Original post by godsenddeath
i'm aware of the difference
Then your compiler is broken and non standards-compliant (I.e. VC6), or you have some very weird directory setup.


Visual Studio 08 Pro, and no weird set up, VS searches it's project paths if it can't find it in the project folder

Share this post


Link to post
Share on other sites
Quote:
Original post by godsenddeath
Visual Studio 08 Pro, and no weird set up, VS searches it's project paths if it can't find it in the project folder
Interesting, I seem to recall having problems when using quotes instead of angle brackets in VC2003 or VC2005. Do you know if this is specified in the standard?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!