🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
Windows Application error, something to do with winnt.h?
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.
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
--
WNDCLASSEX Reality;
...
...
Reality.lpfnWndProc=ComputerGames;
...
...
RegisterClassEx(&Reality);
Unable to register Reality...what''s wrong?
---------
Dan Upton
Lead Designer
WolfHeart Software
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.
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.
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/
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement