windows.h

Started by
10 comments, last by hughiecoles 15 years, 5 months ago
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

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.
It's a sofa! It's a camel! No! It's Super Llama!
#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.
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.
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
--------------------------------------Not All Martyrs See Divinity, But At Least You Tried
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.
i'm aware of the difference
--------------------------------------Not All Martyrs See Divinity, But At Least You Tried
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.
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
--------------------------------------Not All Martyrs See Divinity, But At Least You Tried
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?

This topic is closed to new replies.

Advertisement