点云库PCL在Qt下编译
本文详细的描述了搭载pcl点云库到Qt的过程,初学者完全可以照搬,大神请绕行,不喜勿喷
首先提供Qt1.8.1的下载地址:http://download.qt.io/archive/qt/5.12/5.12.1/
PCL1.8.1下载地址:链接:https://pan.baidu.com/s/1VP8E8LPh2gz7xP3C9akyFQ
提取码:0siy
安装PCL1…8.1详见:https://blog.csdn.net/qq_21815981/article/details/79841683
安装完PCL就行,不用看后面的配置VS。
msvc使用VS2017。下载安装详见:https://blog.csdn.net/zyhse/article/details/105362609
安装好Qt,VS,PCL后,下面进行配置环境:
1.环境变量配置:右击《我的电脑》点击属性,然后找到《高级系统设置》,然后在高级系统设置里面找到《高级》《环境变量》《系统变量》的path新建如下变量:
安装PCL1.8.1时记得把安装包的pcl-1.8.1rc2-pdb-msvc2017-win64文件夹里面的所有pdb文件复制到PCL1.8.1安装路径的bin文件夹下面。
以上基本工作就做完了:新建Qt程序,在pro文件下添加
INCLUDEPATH += H:/PCL1.8.1/include/pcl-1.8\
INCLUDEPATH += H:/PCL1.8.1/include/pcl-1.8/pcl\
INCLUDEPATH += H:/PCL1.8.1/3rdParty/Boost/include/boost-1_64\
INCLUDEPATH += H:/PCL1.8.1/3rdParty/Boost/include/boost-1_64/boost\
INCLUDEPATH += H:/PCL1.8.1/3rdParty/Eigen/eigen3\
INCLUDEPATH += H:/PCL1.8.1/3rdParty/FLANN/include\
INCLUDEPATH += H:/PCL1.8.1/3rdParty/FLANN/include/flann\
INCLUDEPATH += H:/PCL1.8.1/3rdParty/OpenNI2/Include\
INCLUDEPATH += H:/PCL1.8.1/3rdParty/Qhull/include\
INCLUDEPATH += H:/PCL1.8.1/3rdParty/VTK/include/vtk-8.0\
INCLUDEPATH += H:/PCL1.8.1/3rdParty/libLAS/include\
INCLUDEPATH += H:/PCL1.8.1/3rdParty/libLAS/include/liblas\
CONFIG(debug,debug|release){
LIBS += -LH:/PCL1.8.1/lib\
-lpcl_common_debug\
-lpcl_features_debug\
-lpcl_filters_debug\
-lpcl_io_debug\
-lpcl_io_ply_debug\
-lpcl_kdtree_debug\
-lpcl_keypoints_debug\
-lpcl_ml_debug\
-lpcl_octree_debug\
-lpcl_outofcore_debug\
-lpcl_people_debug\
-lpcl_recognition_debug\
-lpcl_registration_debug\
-lpcl_sample_consensus_debug\
-lpcl_search_debug\
-lpcl_segmentation_debug\
-lpcl_stereo_debug\
-lpcl_surface_debug\
-lpcl_tracking_debug\
-lpcl_visualization_debug\
LIBS += -LH:/PCL1.8.1/3rdParty/Boost/lib\
-llibboost_atomic-vc141-mt-gd-1_64\
-llibboost_bzip2-vc141-mt-gd-1_64\
-llibboost_chrono-vc141-mt-gd-1_64\
-llibboost_container-vc141-mt-gd-1_64\
-llibboost_context-vc141-mt-gd-1_64\
-llibboost_coroutine-vc141-mt-gd-1_64\