Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error while compiling a VC++ program

Status
Not open for further replies.

yeggy

Programmer
Mar 28, 2002
3
US
Hi ..
I installed Microsoft VC++. I created a windows console application,created a cpp file. Everything was going okay , when suddenly, it started giving me the following error.

*******************
Compiling...
try1.cpp
c:\program files\microsoft visual studio\vc98\include\winnt.h(1092) : error C2146: syntax error : missing ';' before identifier 'KSPIN_LOCK'
c:\program files\microsoft visual studio\vc98\include\winnt.h(1092) : fatal error C1004: unexpected end of file found
Error executing cl.exe.

try1.obj - 2 error(s), 0 warning(s
*********************

I get this error even if I have an empty cpp file.
Can anybody tell me a fix for this?

Thanks
 
Double click on the error line and it will bring you to the problem. Either on the line before or the line you are on you will see a missing semi-color OR you are using an undefined type. Seems odd though because from the error, it seems the problem in in winnt.h itself.

Matt
 
That is right, i don't understand as to why there should be a syntax error in winnt.h Also all my programs were working fine until sometime back,it started popping this error. I tried replacing winnt.h by copying from another computer that has VC ++. Another thing I saw was that my basestd.h file is 0 bytes.
Do you think that this is the problem. What is its usual size?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top