Public Group

# windows.h

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

## 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 on other sites
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 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 on other sites
Quote:
 Original post by noobletWell 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 on other sites
Quote:
 Original post by Super LlamaHow are you including the file?#include "windows.h" will still generate an error even if the directory is included (I think)#include 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 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 on other sites
i'm aware of the difference

##### Share on other sites
Quote:
 Original post by godsenddeathi'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 on other sites
Quote:
Original post by Evil Steve
Quote:
 Original post by godsenddeathi'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 on other sites
Quote:
 Original post by godsenddeathVisual 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?

1. 1
2. 2
3. 3
Rutin
18
4. 4
5. 5
JoeJ
13

• 14
• 10
• 25
• 9
• 57
• ### Forum Statistics

• Total Topics
632640
• Total Posts
3007618
• ### Who's Online (See full list)

There are no registered users currently online

×

## Important Information

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!