不知道为什么,vs  2008  C++一个项目也编译不过,类似没有正确包含头文件信息。

错误提示如下:

Cardgame.cpp
c:\program files\microsoft visual studio 9.0\vc\include\excpt.h(60) : error C2065: “_$notnull”: 未声明的标识符
c:\program files\microsoft visual studio 9.0\vc\include\excpt.h(60) : error C3861: “_Pre1_impl_”: 找不到标识符
c:\program files\microsoft visual studio 9.0\vc\include\excpt.h(60) : error C2146: 语法错误 : 缺少“)”(在标识符“_Deref_pre2_impl_”的前面)
c:\program files\microsoft visual studio 9.0\vc\include\excpt.h(60) : warning C4229: 使用了记时错误 : 忽略数据上的修饰符
c:\program files\microsoft visual studio 9.0\vc\include\excpt.h(64) : error C2059: 语法错误 : “)”
c:\program files\microsoft visual studio 9.0\vc\include\excpt.h(132) : warning C4159: #pragma pack(pop,...) : 将先前入栈的标识符

......

 

原因:
C:\Program Files\Microsoft Visual Studio 9.0\VC\include\CodeAnalysis\sourceannotations.h  文件被篡改(可以看修改时间)

解决方法:copy 覆盖。

 

参考:http://stackoverflow.com/questions/1268604/vs-2008-623-complier-errors

posted on 2010-10-25 11:38  佐伊凡  阅读(407)  评论(0编辑  收藏  举报