上午我在创建了COM DLL后能正常,现在我再创建一个MFC DLL后,什么都没有操作,编译却报告下面的错误: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

解决方案 »

  1.   

    你C:\program files\microsoft visual studio\vc98\include\winnt.h无意中给你修改了,只要在'KSPIN_LOCK'那附近加上‘;’就可以。
      

  2.   

    to楼上的:
    我没有修改这个文件呀,下面是原来的代码:
    typedef UINT_PTR KSPIN_LOCK;
    typedef KSPIN_LOCK *PKSPIN_LOCK;
      

  3.   

    是不是有什么地方定义了 _WIN64 ? 看看 Preprocessor definitions 和 stdafx.h
      

  4.   

    或者你的WINNT.h 少了一个  } 号。