Jump to content
  • Advertisement
Sign in to follow this  
cloned

i need some help

This topic is 4134 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

ok i got the windows application template installed for Visual C++ but now when i compile it is saying i am missing windows.h i have read the readme file that it created but no luck and i have found that stdafx.h is the file calling windows.h do i need to download something else for the pre-compiled header because i am lost on where to get this file also is there anyway i can add headers to a master list instead of putting them in the folder of the project.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by cloned
ok i got the windows application template installed for Visual C++ but now when i compile it is saying i am missing windows.h
Are you including windows.h by saying #include "windows.h" or #include <windows.h> ? The second one is the correct way to do it. But, even then, it looks as though you're creating an MFC application, yes? In that case, windows.h shouldn't be used; include afxwin.h instead.

Quote:
Original post by cloned
also is there anyway i can add headers to a master list instead of putting them in the folder of the project.
If you're using Visual C++ 2005, go to Tools->Options->Projects and Solutions->VC++ Directories. From there you can set all your includes, libraries, and executables directories (and more) that Visual Studio will look to when compiling. If you're using an older version of Visual, I think you have to go to Project->Options->Directories or something like that. Just look through the Project & Tools option menus, you'll find it.

Share this post


Link to post
Share on other sites
the include for windows.h was in the pre-compiled header and it was the second way, yet it still tells me it can't find it when i compile

i was following the instructions from the Nehe tutorial, i am not sure if i am supposed to use the pre-compiled header for the tutorial's code or not. i have always had trouble with these bloody pre-compiled headers

thank you, it appears i had the older version of that one.

i am installing it now

[Edited by - cloned on January 26, 2007 2:31:08 PM]

Share this post


Link to post
Share on other sites
sorry for the double post but i figured it out.

the installer didn't update the include links. now it works fine

but may i ask what does afxwin.h and windows.h do?

Share this post


Link to post
Share on other sites
windows.h contains the Windows-specific functionality to do things like create a window (which is what NeHe uses it for, I believe), handle messages from Windows (key pressed, mouse clicked, window closed, etc.), check the time... basically anything on an operating system level.

Not sure about afxwin.h, but it's probably a similar header for MFC. I'm not sure, since I've never really used MFC before.

Share this post


Link to post
Share on other sites
Quote:
Original post by EmrldDrgn
Not sure about afxwin.h, but it's probably a similar header for MFC.
Yeah, pretty much. It defines the usual MFC garb and includes a bundle of other MFC files. Afxwin.h also includes windows.h, which is why some of you may see an error saying that you don't need to include windows.h in an MFC application, as afxwin.h will handle all that.

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!