1.准备工作

PCL1.8.0 All in one:下载安装省略
pcl-master源码https://github.com/PointCloudLibrary/pcl/releases/tag/pcl-1.8.0
Cmake:官网下载最新版本即可
CUDA:下载跟自己GPU对应的版本(我的GPU是GeForce MX250)
我安装的都是64位版本

2.Cmake编译

PCL1.8.0+VS2013+CUDA10.0源码编译(GPU)PCL1.8.0+VS2013+CUDA10.0源码编译(GPU)
点击Add Entry:配置PCL1.8.0 all in one安装的第三方库的路径:
PCL1.8.0+VS2013+CUDA10.0源码编译(GPU)
PCL1.8.0+VS2013+CUDA10.0源码编译(GPU)
根据需要勾选gpu相关模块进行编译,黑色框中必选
PCL1.8.0+VS2013+CUDA10.0源码编译(GPU)

3.VS打开PCL.sln

PCL1.8.0+VS2013+CUDA10.0源码编译(GPU)
PCL1.8.0+VS2013+CUDA10.0源码编译(GPU)
INSTALL同样生成操作
PCL1.8.0+VS2013+CUDA10.0源码编译(GPU)

4.会出现的报错

1.错误 LNK1112 模块计算机类型“x86”与目标计算机类型“X64”冲突
解决方法:
根据显卡的算力输入相应数字,我的是6.1
显卡算力查询:https://blog.csdn.net/fa544384733/article/details/104796518
PCL1.8.0+VS2013+CUDA10.0源码编译(GPU)
2.F:/pcl-1.8.1/cuda/sample_consensus/src/sac_model_plane.cu(195): error: class “thrust::device_reference” has no member “x” detected during:…
解决方法:
根据报错,打开所在文件,在指定行将
PCL1.8.0+VS2013+CUDA10.0源码编译(GPU)
修改成
PCL1.8.0+VS2013+CUDA10.0源码编译(GPU)
涉及多处,但可以手动修改成功,不报错
3.example_nurbs_viewer_surface失败
解决方法:
直接取消example的编译

最后祝大家编译成功!

相关文章: