CMake+VS2013编译与安装32/64位PCL1.8RC1源码

来源:互联网 发布:中文数据库有哪些 编辑:程序博客网 时间:2024/06/12 12:31

CMake+VS2013编译与安装32/64位PCL1.8RC1源码
主要参照了Mr_Alwayswannago博主写的博客。

稍微记录一下自己用的库还有出现的小问题。

这里写图片描述

出现了一个问题,自己手贱出现的。
cmakepcl的时候
这里写图片描述
把OPENNI也选上了,原文是没有选的。
后来编译就出现了一大丢错误。

这里写图片描述

百度一下,找到了解决方法。
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, 保存即可。