VS2003编译OGRE error C2065: '__in' : undeclared identifier 解决
来源:互联网 发布:云帆搜索软件 编辑:程序博客网 时间:2024/04/28 02:32
编译所需要的东西
WinXP SP3 + MS VS 2003 + CMake 2.8 + Ogre 1.7.1 + Microsoft DirectX SDK (June 2010)+ OgreDependencies_MSVC_20100106.zip
编译时出现:
------ Build started: Project: RenderSystem_Direct3D9, Configuration: Release Win32 ------
Compiling...
cl : Command line warning D4002 : ignoring unknown option '/fp:fast'
OgreD3D9VideoModeList.cpp
D:\Works\DX9_SDK\Include\DxErr.h(26) : error C2065: '__in' : undeclared identifier
D:\Works\DX9_SDK\Include\DxErr.h(26) : error C2146: syntax error : missing ')' before identifier 'HRESULT'
D:\Works\DX9_SDK\Include\DxErr.h(26) : warning C4229: anachronism used : modifiers on data are ignored
D:\Works\DX9_SDK\Include\DxErr.h(26) : error C2059: syntax error : ')'
D:\Works\DX9_SDK\Include\DxErr.h(27) : error C3861: '__in': identifier not found, even with argument-dependent lookup
D:\Works\DX9_SDK\Include\DxErr.h(27) : error C2146: syntax error : missing ')' before identifier 'HRESULT'
D:\Works\DX9_SDK\Include\DxErr.h(27) : warning C4229: anachronism used : modifiers on data are ignored
D:\Works\DX9_SDK\Include\DxErr.h(27) : error C2059: syntax error : ')'
D:\Works\DX9_SDK\Include\DxErr.h(46) : error C3861: '__in': identifier not found, even with argument-dependent lookup
D:\Works\DX9_SDK\Include\DxErr.h(46) : error C2146: syntax error : missing ')' before identifier 'HRESULT'
D:\Works\DX9_SDK\Include\DxErr.h(46) : warning C4229: anachronism used : modifiers on data are ignored
D:\Works\DX9_SDK\Include\DxErr.h(46) : error C2059: syntax error : ')'
D:\Works\DX9_SDK\Include\DxErr.h(47) : error C3861: '__in': identifier not found, even with argument-dependent lookup
D:\Works\DX9_SDK\Include\DxErr.h(47) : error C2146: syntax error : missing ')' before identifier 'HRESULT'
D:\Works\DX9_SDK\Include\DxErr.h(47) : warning C4229: anachronism used : modifiers on data are ignored
D:\Works\DX9_SDK\Include\DxErr.h(47) : error C2059: syntax error : ')'
D:\Works\DX9_SDK\Include\DxErr.h(71) : error C2065: '__in_z' : undeclared identifier
D:\Works\DX9_SDK\Include\DxErr.h(71) : error C2143: syntax error : missing ')' before 'const'
D:\Works\DX9_SDK\Include\DxErr.h(71) : warning C4229: anachronism used : modifiers on data are ignored
D:\Works\DX9_SDK\Include\DxErr.h(71) : error C2059: syntax error : ')'
D:\Works\DX9_SDK\Include\DxErr.h(72) : error C3861: '__in_z': identifier not found, even with argument-dependent lookup
D:\Works\DX9_SDK\Include\DxErr.h(72) : error C2143: syntax error : missing ')' before 'const'
D:\Works\DX9_SDK\Include\DxErr.h(72) : warning C4229: anachronism used : modifiers on data are ignored
D:\Works\DX9_SDK\Include\DxErr.h(72) : error C2059: syntax error : ')'
d:\Works\OgreSources_1.7.2\OgreMain\include\OgreTexture.h(433) : fatal error C1903: unable to recover from previous error(s); stopping compilation
...
===========解决方法===========
在DxErr.h自定义
#define __in
#define __in_z
#define __in_z_opt
然后编译OK!
2,_wfindfirst不能将参数 1 从“const wchar_t *”转换为“wchar_t *"错误
将if ((f = _wfindfirst((Utf8ToUtf16((dir_name + file_pattern).c_str()).c_str()), &fd)) != -1)修改成
if ((f = _wfindfirst((wchar_t*)(Utf8ToUtf16((dir_name + file_pattern).c_str()).c_str()), &fd)) != -1)
- VS2003编译OGRE error C2065: '__in' : undeclared identifier 解决
- error C2065: ‘__in’ : undeclared identifier
- 解决编译Gh0st时error C2065: 'IDC_HAND' : undeclared identifier
- 解决error C2065: 'mwSize' : undeclared identifier
- error:VC编译错误:error C2065: '_beginthreadex' : 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
- error C2065: 'WM_SETMESSAGESTRING' : undeclared identifier
- error C2065: 'DirectInputCreate' : undeclared identifier
- error C2065: 'AfxEnableControlContainer' : undeclared identifier
- error C2065: 'i' : undeclared identifier
- error C2065: 'ULONG_PTR' : undeclared identifier
- 1->n MPI_Scatter MPI_Bcast
- Mysql Master/Slave的配置
- 源码安装mysql
- ArcGIS API for Silverlight 学习笔记
- [jQuery一点一滴]jQuery简介
- VS2003编译OGRE error C2065: '__in' : undeclared identifier 解决
- group by 、 having 、 order by
- stagefright框架(五)-Video Rendering
- 在Apache中整合JSP和PHP
- hashset hashmap hashtable arraylist vector 区别
- Configure,Makefile.am, Makefile.in, Makefile文件之间关系
- android 源码下载
- 接口和抽象类区别
- oracle11g密码大小写敏感问题