Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Machaira

Errors in standard headers

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

I am not sure, but I don't believe you are supposed to include winuser.h directly (I just have never done it, doesn't mean it can't be done).

include windows.h and it will pull in the necessary header information from its dependency headers.


HTH,

-mordell


Share this post


Link to post
Share on other sites
Advertisement
That seems to have done it - thanks! I wish there was some way of knowing these kinds of things. Including windows.h increased the compile time, but I guess that's the way it goes.

[This message has been edited by Machaira (edited October 21, 1999).]

Share this post


Link to post
Share on other sites
Machaira, I think you'll find that the more you program, the more things you'll need to know that aren't in books. At least that's been my experience thus far. Guards in header files, for example, I've yet to see described in any C++ book, yet they're absolutely necessary to learn. Maybe someone should write an "what the other books dont tell you" book one of these days. --Nolan

Share this post


Link to post
Share on other sites
Nearly every programming book you will come across details include guards. I'm assuming you mean:

#ifndef __HEADER_H
#define __HEADER_H

// code goes here

#endif

Share this post


Link to post
Share on other sites
I'm getting weird errors in headers that I'm including in my code. I included winuser.h to call the SetTimer and KillTimer functions and I get the following errors:

c:\microsoft visual studio\vc98\include\winuser.h(39) : error C2146: syntax error : missing ';' before identifier 'HDWP'
c:\microsoft visual studio\vc98\include\winuser.h(39) : fatal error C1004: unexpected end of file found

I get the same kind of problem when I include dsound.h. I get 14 errors from including that header.

I've added the dsound.lib to the Link tab of the project settings. User32.lib was already there for the winuser.h.

I'm stumped! Any help would be appreciated.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!