OpenNI1.5 VS2013配置环境后,编译会出现这个错误:

https://www.cnblogs.com/asmer-stone/p/5537111.html

#error : Xiron Platform Abstraction Layer - Win32 - Microsoft Visual Studio versions above 2010 (10.0) are not supported! 解决方案
OpenNI1.5 VS2013配置环境后,编译会出现这个错误:
错误    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里边有一段版本检查代码:
复制代码
#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
复制代码
解决方案:
用管理员身份运行VS,打开项目,找到报错位置(会定向到XnPlatform.h),把1600改为1900, 保存即可

posted on 2018-12-26 17:39 zmj 阅读(608) 评论(0)  编辑 收藏 引用


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理