Visual Studio 2010 error C2065: '_In_opt_z_' : undeclared identifier 编译错误
来源:互联网 发布:网络邮箱广告投放 编辑:程序博客网 时间:2024/05/16 14:28
当用Visual Studio 2010 编译时 发生如下编译错误:
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(550): error C2065: '_In_opt_z_' : undeclared identifier
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(550): error C2143: syntax error : missing ')' before 'const'
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(550): warning C4229: anachronism used : modifiers on data are ignored
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(550): error C2182: '_invoke_watson' : illegal use of type 'void'
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(550): error C2495: '_invoke_watson' : '__declspec(noreturn)' can only be applied to function declarations or definitions
。。。
。。。
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(96): error C2144: syntax error : 'int' should be preceded by ')'
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(96): error C2448: 'isupper' : function-style initializer appears to be a function definition
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(96): error C2059: syntax error : ')'
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(97): error C2144: syntax error : 'int' should be preceded by ';'
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(97): error C2065: '_In_' : undeclared identifier
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(97): error C2144: syntax error : 'int' should be preceded by ')'
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(97): error C2448: '_isupper_l' : function-style initializer appears to be a function definition
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(97): error C2146: syntax error : missing ';' before identifier '_locale_t'
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(97): error C2059: syntax error : ')'
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(98): error C2144: syntax error : 'int' should be preceded by ';'
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(98): error C2065: '_In_' : undeclared identifier
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(98): error C2144: syntax error : 'int' should be preceded by ')'
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(98): error C2448: 'islower' : function-style initializer appears to be a function definition
2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ctype.h(98): error C2059: syntax error : ')'
。。。
这是由于WDK中的sal.h文件和Visual Studio中的sal.h文件冲突了。
由于Visual Studio 2010中的sal.h文件比较新,因此产生了这个错误。
解决方法:
1.删除WDK中的sal.h
2.重命名WDK中的sal.h
3.把Visual Studio 2010中的sal.h copy到WDK目录中 覆盖WDK的sal.h
WDK sal.h的位置在:C:\WinDDK\7600.16385.0\inc\api\sal.h
- Visual Studio 2010 error C2065: '_In_opt_z_' : undeclared identifier 编译错误
- Visual Studio 2010 error C2065: '_In_opt_z_' : undeclared identifier 编译错误
- Visual Studio 2010 error C2065: '_In_opt_z_' : undeclared identifier 编译错误
- Visual Studio 2010 error C2065: '_In_opt_z_' : undeclared identifier 编译错误
- error:VC编译错误:error C2065: '_beginthreadex' : undeclared identifier
- glog0.3.5 编译错误error C2065: 'uint64_t' : undeclared identifier
- VC++错误:error C2065: 'SHCreateDirectoryEx' : undeclared identifier
- error C2065: '_beginthread' : undeclared identifier错误处理
- VS2008下编译错误(error C2065: '_S1max' : undeclared identifier)的解决办法
- namespace妙用 及解决VC6.0 编译 弹出气球 出现错误 error C2065: 'NIIF_INFO' : undeclared identifier
- error C2065: '_beginthread' : undeclared identifier
- error C2065: 'IDD_SHOWINFODLG' : undeclared identifier
- error C2065: 'CComVariant' : undeclared identifier
- error C2065: 'CArchiveStream' : undeclared identifier
- error C2065: 'getCmdBuf1' : undeclared identifier
- error C2065: 'DEBUG_NEW' : undeclared identifier?
- error C2065: 'NULL' : undeclared identifier
- error C2065: 'pcap_findalldevs_ex' : undeclared identifier
- 关于分布式系统的数据一致性问题(二)
- 【J2SE】配置JDK环境变量
- 分支结构练习-3.switch结构判断成绩
- 数据库资料
- iOS学习总结之UI框架UIWindow和UIView(附带计时器学习)
- Visual Studio 2010 error C2065: '_In_opt_z_' : undeclared identifier 编译错误
- 第三周工作总结及计划表
- 2 JavaWeb之Mac下配置Tomcat
- 关于分布式系统的数据一致性问题(三)
- poj 2503 Babelfish(字典树·翻译)
- 2015—年度总结
- C++ 堆排序算法 分治法(递归)
- Spring --- DisposableBean
- 分支结构练习-4.登录系统