--------------------Configuration: sdfsf - Win32 Debug--------------------
Compiling...
dfdf.cpp
e:\program files\microsoft visual studio\vc98\include\winnt.h(1092) : error C2146: syntax error : missing ';' before identifier 'KSPIN_LOCK'
e:\program files\microsoft visual studio\vc98\include\winnt.h(1092) : fatal error C1004: unexpected end of file found
Error executing cl.exe.dfdf.obj - 2 error(s), 0 warning(s)
不知道编译器除了什么问题,即使是用系统生成的WIN32程序也会出错。

解决方案 »

  1.   

    typedef UINT_PTR KSPIN_LOCK;
      

  2.   

    我双击就直接跳到WINNT.h的typedef UINT_PTR KSPIN_LOCK;中
      

  3.   

    这是原文件,应该没错,我开始编译还通过,现在就不行了
    #include <windows.h>int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,                   PSTR szCmdLine, int iCmdShow){MessageBox (NULL, TEXT ("Hello, Windows 98!"), TEXT ("HelloMsg"), 0);return 0 ;}
      

  4.   

    这是原文件,应该没错,我开始编译还通过,现在就不行了
    #include <windows.h>int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,                   PSTR szCmdLine, int iCmdShow){MessageBox (NULL, TEXT ("Hello, Windows 98!"), TEXT ("HelloMsg"), 0);return 0 ;}
      

  5.   

    在winnt.h文件中搜索一下是否包含
    #include <basetsd.h>,
    如果没有就添加上.
      

  6.   

    可能是无意删除了#include <basetsd.h>.
      

  7.   

    Do you support Windows 2000,XP in this project ? I think you need to set WINVER to support Windows 2000 onwards (or NT onwards if you support). Following MSDN articles can help, Using the Windows Headers How to: Modify WINVER
      

  8.   

      我今天编 win32 程序也遇到了这个问题 重装了VC6 还是不行
    急 请高手指点!
      

  9.   

    #include <basetsd.h> 就是这个问题 
      

  10.   

    你在VC98的include文件夹里面看看BASETSD.H这个头文件是否改动了。如果改动了就改回去,我的就是这个文件被我删除了,出现了和你一样的问题。现在改回来就OK了