• Advertisement

Archived

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

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

This topic is 6037 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 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.

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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/

Share this post


Link to post
Share on other sites

  • Advertisement