#error : Xiron Platform Abstraction Layer - Win32 - Microsoft Visual Studio versions above 2010 (10.0) are not supported! 解決方案
OpenNI1.5 VS2013配置環(huán)境后,編譯會出現(xiàn)這個錯誤:
錯誤 4 error C1189: #error : Xiron Platform Abstraction Layer - Win32 - Microsoft Visual Studio versions above 2010 (10.0) are not supported! c:\program files\openni\include\XnPlatform.h 57 1 test
原因是OpenNI的 XnPlatform.h里邊有一段版本檢查代碼:
復(fù)制代碼
#ifndef RC_INVOKED
#if _MSC_VER < 1300 // Before MSVC7 (2003)
#error Xiron Platform Abstraction Layer - Win32 - Microsoft Visual Studio versions below 2003 (7.0) are not supported!
#endif
#if _MSC_VER > 1600 // After MSVC8 (2010)
#error Xiron Platform Abstraction Layer - Win32 - Microsoft Visual Studio versions above 2010 (10.0) are not supported!
#endif
#endif
復(fù)制代碼
解決方案:
用管理員身份運(yùn)行VS,打開項(xiàng)目,找到報(bào)錯位置(會定向到XnPlatform.h),把1600改為1900, 保存即可