vs2010 库函数问题:objidl.h(11266) : error C2061: syntax error : identifier '__RPC__out_xcount_part'
2014-10-22 17:10
741 查看
1.未使用DirectX时处理方法引用内容出自:/article/1820947.html
这个错误是lib文件缺失或者include缺失导致的,但VS2010的UI设置的相当不合理,让人们想编辑原先的VC++目录文件却无从下手。解决方案如下:打开VS2010工程项目
注意 在左下角有Solution Explorer、Class View、Property Manager等几个选项
在VS2010中修改Inherited VC++ Directories和之前的VS不一样了。
显示Property Manager
里面有Debug|Win32和Release|Win32选 项
这2个选项可以设置Debug和Release的工程属性设置
打开其中任何一个
双击 Microsoft.Cpp.Win32.user会弹出Microsoft.Cpp.Win32.user Property Pages页面,
在这里可以修改Inherited VC++ Directories。
如果你遇到了下面的编译错误:
objidl.h(11266) : error C2061: syntax error : identifier '__RPC__out_xcount_part'
用上面的方法把DirectX SDK Include从Include路径中删除就可以了。
补充说明:
在project property对话框里面修改的VC++ Directories是特定于工程的。以上修改的VC++ Directories是全局的,影响所有工程和所有配置(Debug/Release/...)。
2.使用DirectX SDK时,只能使用较高版本的DirectX SDK才能解决这个问题,即更换高版本SDK,本人更换的SDK为 Microsoft DirectX SDK (June 2010)下载地址为:http://www.microsoft.com/en-us/download/confirmation.aspx?id=6812 另给出浅墨大神使用的SDK下载地址:http://www.microsoft.com/en-us/download/confirmation.aspx?id=10568
后者是会报错的。
在使用各种库的时候,时不时就会遇到库文件和Windows库文件冲突问题,大部分都是因为两个库的包含顺序造成两个库的头文件中变量或者宏之类的有冲突。出现这种问题又不能修改Inherit from parent or project defaults,所以没法把Windows SDK库文件放在DirectXSDK库文件之后,个人觉得可以把Inherit from parent or project defaults去掉,然后自己项目中单独把那些包含的头文件添加进去,这样就可以调整整个顺序了。没有试,理论上是可以的。
相关文章推荐
- vs2010 库函数问题:objidl.h(11266) : error C2061: syntax error : identifier '__RPC__out_xcount_part'
- error C2061: syntax error : identifier '__RPC__out_xcount_part'
- error C2061: syntax error : identifier '__RPC__out_xcount_part'
- 编译过程中弹出new(35) : error C2061: syntax error : identifier 'THIS_FILE'问题的原因及解决方法
- 【转】编译时遇到如下错误error C2061: syntax error : identifier 'THIS_FILE'
- 编译时遇到如下错误error C2061: syntax error : identifier 'THIS_FILE'
- 2014-04-08工作日志:error C2061: syntax error : identifier 'LPPROFILEINFO'
- 编译时遇到如下错误error C2061: syntax error : identifier 'THIS_FILE'
- 编译时遇到如下错误error C2061: syntax error : identifier 'THIS_FILE'
- 编译时遇到如下错误error C2061: syntax error : identifier 'THIS_FILE'
- xtree ( 1317 ) : error C2061: syntax error : identifier '_Wherenode'
- C2061语法错误标识符__RPC__out_xcount_part 解决方法(VS2010)
- VS2010 语法错误: 标识符“__RPC__out_xcount_part” 解决方法
- 编译错误:syntax error : identifier '__RPC__in'
- error C2061: 语法错误: 标识符“__RPC__out_xcount_part” VS2010
- [转]VS2010 语法错误: 标识符“__RPC__out_xcount_part” 解决方法
- ]VS2010 语法错误: 标识符“__RPC__out_xcount_part” 解决方法
- 关于syntax error : missing ';' before identifier 'PVOID64' 问题
- error C2061: 语法错误: 标识符“__RPC__out_xcount_part” VS2010
- Android出错问题:AndroidManifest.xml:2: error: No resource identifier found for attribute 'installLocatio