Jump to content

  • Log In with Google      Sign In   
  • Create Account


Windows Application error, something to do with winnt.h?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 GameDev135   Members   -  Reputation: 133

Like
Likes
Like

Posted 09 July 2001 - 01:59 AM

I have just started learning game programming so I am now using windows applications instead of windows consoles. To start I wanted to use the wizard to make a HelloWorld program. It appears to work, but then it gives me an error: c:\program files\microsoft visual studio\vc98\include\winnt.h(1092) : error C2146: syntax error : missing '';'' before identifier ''KSPIN_LOCK'' and then a second error which is related apparently: "c:\program files\microsoft visual studio\vc98\include\winnt.h(1092) : fatal error C1004: unexpected end of file found I have reinstalled the compiler to see if winnt.h was corrupt or something. That has done nothing. The line in winnt.h which it points to is line 1092, which is typedef UINT_PTR KSPIN_LOCK; Someone please help! Thanks.

Sponsor:

#2 draqza   Members   -  Reputation: 122

Like
Likes
Like

Posted 09 July 2001 - 03:46 AM

If you''re using the wizard, this might not be the case, but sometimes, if you declare structs/classes before your #includes and forget to put a semicolon after the closing brace, it can cause an error in the header. Alternately, if you''re not using WinNT, you can probably remove the include line because you probably won''t need it.
--


WNDCLASSEX Reality;
...
...
Reality.lpfnWndProc=ComputerGames;
...
...
RegisterClassEx(&Reality);


Unable to register Reality...what''s wrong?
---------
Dan Upton
Lead Designer
WolfHeart Software


#3 GameDev135   Members   -  Reputation: 133

Like
Likes
Like

Posted 09 July 2001 - 04:17 AM

The thing is I didn''t actually type any code. All I did was use the wizard and then tried to compile.

I deleted the software and installed it again. Now it works. The only thing is I would like to know what caused the problem from starting so I can prevent it from occuring again.

#4 draqza   Members   -  Reputation: 122

Like
Likes
Like

Posted 09 July 2001 - 09:57 AM

I don''t know then...I just made a hello world program from the wizard and it compiled fine. But here''s the link to my page with the articles now--you may get some use out of them: http://www20.brinkster.com/draqza/




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS