当前位置: 代码迷 >> 综合 >> PCL配置:VS2015 + PCL1.8.1 + win10
  详细解决方案

PCL配置:VS2015 + PCL1.8.1 + win10

热度:0   发布时间:2024-02-22 10:37:38.0

安装PCL库:
PCL安装包/PCL(解压)
运行 PCL-1.8.1-Allinone 应用程序在这里插入图片描述
在这里插入图片描述
选择 Add PCL to he system PATH for all users
在这里插入图片描述
在这里插入图片描述
忽略警告
在这里插入图片描述完成。
解压 PCL安装包中的pdb文件在这里插入图片描述
将其中的全部pbd文件 粘贴到安装路径 D:\PCL 1.8.0\bin 文件夹下。
在这里插入图片描述

配置环境:
win10中找到 控制面板—》系统—》高级系统设置—》环境变量——系统变量
在系统变量中找到Path添加上以下路径
%PCL_ROOT%\bin
%PCL_ROOT%\3rdParty\FLANN\bin
%PCL_ROOT%\3rdParty\Qhull\bin
%PCL_ROOT%\3rdParty\OpenNI2\Tools
%PCL_ROOT%\3rdParty\VTK\bin

完成PCL安装!

VS中配置PCL:

1. 新建项目
注意为win32控制台应用程序
在这里插入图片描述
2. 更改debug为 x64在这里插入图片描述
3. 打开属性管理器
(视图——》其他窗口——》属性管理器)
在Debug|x64 添加新项目属性
在Debug|x64下 双击上一步新建的属性 打开属性页
![在这里插入图片描述](https://img-blog.csdnimg.cn/20200924215315600.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4

4. 在VC++目录下
在这里插入图片描述

① 包含目录
(具体路径根据安装位置进行选择)

D:\PCL1.8.1\PCL1.8.1\include
D:\PCL1.8.1\PCL1.8.1\include\pcl-1.8.
D:\PCL1.8.1\PCL1.8.1\3rdParty\Boost\include
D:\PCL1.8.1\PCL1.8.1\3rdParty\Boost\include\boost-1_64
D:\PCL1.8.1\PCL1.8.1\3rdParty\Eigen\eigen3
D:\PCL1.8.1\PCL1.8.1\3rdParty\FLANN\include
D:\PCL1.8.1\PCL1.8.1\3rdParty\FLANN\include\flann
D:\PCL1.8.1\PCL1.8.1\3rdParty\OpenNI2\Include
D:\PCL1.8.1\PCL1.8.1\3rdParty\Qhull\include
D:\PCL1.8.1\PCL1.8.1\3rdParty\VTK\include\vtk-8.0

在这里插入图片描述

② 库目录
(具体路径根据安装位置进行选择)

D:\PCL1.8.1\PCL1.8.1\lib
D:\PCL1.8.1\PCL1.8.1\3rdParty\Boost\lib
D:\PCL1.8.1\PCL1.8.1\3rdParty\Boost\include\boost-1_64
D:\PCL1.8.1\PCL1.8.1\3rdParty\FLANN\lib
D:\PCL1.8.1\PCL1.8.1\3rdParty\OpenNI2\Lib
D:\PCL1.8.1\PCL1.8.1\3rdParty\Qhull\lib
D:\PCL1.8.1\PCL1.8.1\3rdParty\VTK\lib

在这里插入图片描述

5. 链接器—》输入—》附加依赖项
(配置debug与release时仅附加依赖项不同,其余全部相同)

Debug:

pcl_common_debug.lib
pcl_features_debug.lib
pcl_filters_debug.lib
pcl_io_debug.lib
pcl_io_ply_debug.lib
pcl_kdtree_debug.lib
pcl_keypoints_debug.lib
pcl_ml_debug.lib
pcl_octree_debug.lib
pcl_outofcore_debug.lib
pcl_people_debug.lib
pcl_recognition_debug.lib
pcl_registration_debug.lib
pcl_sample_consensus_debug.lib
pcl_search_debug.lib
pcl_segmentation_debug.lib
pcl_stereo_debug.lib
pcl_surface_debug.lib
pcl_tracking_debug.lib
pcl_visualization_debug.lib
libboost_atomic-vc140-mt-gd-1_64.lib
libboost_bzip2-vc140-mt-gd-1_64.lib
libboost_chrono-vc140-mt-gd-1_64.lib
libboost_container-vc140-mt-gd-1_64.lib
libboost_context-vc140-mt-gd-1_64.lib
libboost_coroutine-vc140-mt-gd-1_64.lib
libboost_date_time-vc140-mt-gd-1_64.lib
libboost_exception-vc140-mt-gd-1_64.lib
libboost_fiber-vc140-mt-gd-1_64.lib
libboost_filesystem-vc140-mt-gd-1_64.lib
libboost_graph_parallel-vc140-mt-gd-1_64.lib
libboost_graph-vc140-mt-gd-1_64.lib
libboost_iostreams-vc140-mt-gd-1_64.lib
libboost_locale-vc140-mt-gd-1_64.lib
libboost_log-vc140-mt-gd-1_64.lib
libboost_log_setup-vc140-mt-gd-1_64.lib
libboost_math_c99-vc140-mt-gd-1_64.lib
libboost_math_c99f-vc140-mt-gd-1_64.lib
libboost_math_c99l-vc140-mt-gd-1_64.lib
libboost_math_tr1-vc140-mt-gd-1_64.lib
libboost_math_tr1f-vc140-mt-gd-1_64.lib
libboost_math_tr1l-vc140-mt-gd-1_64.lib
libboost_mpi-vc140-mt-gd-1_64.lib
libboost_numpy3-vc140-mt-gd-1_64.lib
libboost_numpy-vc140-mt-gd-1_64.lib
libboost_prg_exec_monitor-vc140-mt-gd-1_64.lib
libboost_program_options-vc140-mt-gd-1_64.lib
libboost_python3-vc140-mt-gd-1_64.lib
libboost_python-vc140-mt-gd-1_64.lib
libboost_random-vc140-mt-gd-1_64.lib
libboost_regex-vc140-mt-gd-1_64.lib
libboost_serialization-vc140-mt-gd-1_64.lib
libboost_signals-vc140-mt-gd-1_64.lib
libboost_system-vc140-mt-gd-1_64.lib
libboost_test_exec_monitor-vc140-mt-gd-1_64.lib
libboost_thread-vc140-mt-gd-1_64.lib
libboost_timer-vc140-mt-gd-1_64.lib
libboost_type_erasure-vc140-mt-gd-1_64.lib
libboost_unit_test_framework-vc140-mt-gd-1_64.lib
libboost_wave-vc140-mt-gd-1_64.lib
libboost_wserialization-vc140-mt-gd-1_64.lib
libboost_zlib-vc140-mt-gd-1_64.lib
vtkzlib-8.0-gd.lib
vtkViewsContext2D-8.0-gd.lib
vtkhdf5_hl-8.0-gd.lib
vtkFiltersProgrammable-8.0-gd.lib
vtkIOMovie-8.0-gd.lib
vtkexpat-8.0-gd.lib
vtkRenderingLOD-8.0-gd.lib
vtkIOPLY-8.0-gd.lib
vtkpng-8.0-gd.lib
vtkIOVideo-8.0-gd.lib
vtkRenderingImage-8.0-gd.lib
vtkFiltersVerdict-8.0-gd.lib
vtkjpeg-8.0-gd.lib
vtkInteractionImage-8.0-gd.lib
vtkverdict-8.0-gd.lib
vtkoggtheora-8.0-gd.lib
vtkImagingStatistics-8.0-gd.lib
vtkCommonSystem-8.0-gd.lib
vtkFiltersParallelImaging-8.0-gd.lib
vtkFiltersTexture-8.0-gd.lib
vtkCommonMisc-8.0-gd.lib
vtkCommonMath-8.0-gd.lib
vtkFiltersSelection-8.0-gd.lib
vtkImagingFourier-8.0-gd.lib
vtkIOXMLParser-8.0-gd.lib
vtkproj4-8.0-gd.lib
vtkalglib-8.0-gd.lib
vtktiff-8.0-gd.lib
vtksqlite-8.0-gd.lib
vtkImagingSources-8.0-gd.lib
vtkCommonTransforms-8.0-gd.lib
vtkImagingMath-8.0-gd.lib
vtkFiltersGeneric-8.0-gd.lib
vtkexoIIc-8.0-gd.lib
vtkfreetype-8.0-gd.lib
vtkImagingColor-8.0-gd.lib
vtknetcdf_c+±gd.lib
vtkNetCDF-8.0-gd.lib
vtkFiltersImaging-8.0-gd.lib
vtkFiltersHyperTree-8.0-gd.lib
vtkImagingMorphological-8.0-gd.lib
vtkImagingStencil-8.0-gd.lib
vtkRenderingFreeType-8.0-gd.lib
vtkCommonColor-8.0-gd.lib
vtkjsoncpp-8.0-gd.lib
vtkRenderingContext2D-8.0-gd.lib
vtkFiltersAMR-8.0-gd.lib
vtkRenderingContextOpenGL-8.0-gd.lib
vtkIOParallelXML-8.0-gd.lib
vtkViewsCore-8.0-gd.lib
vtkImagingHybrid-8.0-gd.lib
vtkIOExport-8.0-gd.lib
vtkRenderingVolumeOpenGL-8.0-gd.lib
vtkIOImport-8.0-gd.lib
vtkDomainsChemistry-8.0-gd.lib
vtkInteractionStyle-8.0-gd.lib
vtkCommonComputationalGeometry-8.0-gd.lib
vtkDICOMParser-8.0-gd.lib
vtklibxml2-8.0-gd.lib
vtkIOMINC-8.0-gd.lib
vtkIOSQL-8.0-gd.lib
vtkFiltersModeling-8.0-gd.lib
vtkParallelCore-8.0-gd.lib
vtkIOAMR-8.0-gd.lib
vtkGeovisCore-8.0-gd.lib
vtksys-8.0-gd.lib
vtkIOEnSight-8.0-gd.lib
vtkImagingGeneral-8.0-gd.lib
vtkFiltersFlowPaths-8.0-gd.lib
vtkIOLSDyna-8.0-gd.lib
vtkFiltersSMP-8.0-gd.lib
vtkIOParallel-8.0-gd.lib
vtkFiltersGeometry-8.0-gd.lib
vtkInfovisLayout-8.0-gd.lib
vtkIOCore-8.0-gd.lib
vtkFiltersSources-8.0-gd.lib
vtkIOLegacy-8.0-gd.lib
vtkFiltersHybrid-8.0-gd.lib
vtkIONetCDF-8.0-gd.lib
vtkFiltersExtraction-8.0-gd.lib
vtkFiltersParallel-8.0-gd.lib
vtkRenderingLabel-8.0-gd.lib
vtkIOInfovis-8.0-gd.lib
vtkRenderingAnnotation-8.0-gd.lib
vtkImagingCore-8.0-gd.lib
vtkCommonExecutionModel-8.0-gd.lib
vtkhdf5-8.0-gd.lib
vtkViewsInfovis-8.0-gd.lib
vtkIOGeometry-8.0-gd.lib
vtkmetaio-8.0-gd.lib
vtkIOImage-8.0-gd.lib
vtkIOXML-8.0-gd.lib
vtkIOExodus-8.0-gd.lib
vtkRenderingVolume-8.0-gd.lib
vtkChartsCore-8.0-gd.lib
vtkFiltersStatistics-8.0-gd.lib
vtkInfovisCore-8.0-gd.lib
vtkRenderingCore-8.0-gd.lib
vtkInteractionWidgets-8.0-gd.lib
vtkRenderingOpenGL-8.0-gd.lib
vtkFiltersGeneral-8.0-gd.lib
vtkFiltersCore-8.0-gd.lib
vtkCommonDataModel-8.0-gd.lib
vtkCommonCore-8.0-gd.lib
flann_cpp_s-gd.lib
qhullstatic_d.lib
OpenNI2.lib

release:

pcl_common_release.lib
pcl_features_release.lib
pcl_filters_release.lib
pcl_io_ply_release.lib
pcl_io_release.lib
pcl_kdtree_release.lib
pcl_keypoints_release.lib
pcl_octree_release.lib
pcl_outofcore_release.lib
pcl_people_release.lib
pcl_recognition_release.lib
pcl_registration_release.lib
pcl_sample_consensus_release.lib
pcl_search_release.lib
pcl_segmentation_release.lib
pcl_surface_release.lib
pcl_tracking_release.lib
pcl_visualization_release.lib
libboost_atomic-vc120-mt-1_61.lib
libboost_chrono-vc120-mt-1_61.lib
libboost_container-vc120-mt-1_61.lib
libboost_context-vc120-mt-1_61.lib
libboost_coroutine-vc120-mt-1_61.lib
libboost_date_time-vc120-mt-1_61.lib
libboost_exception-vc120-mt-1_61.lib
libboost_filesystem-vc120-mt-1_61.lib
libboost_graph-vc120-mt-1_61.lib
libboost_iostreams-vc120-mt-1_61.lib
libboost_locale-vc120-mt-1_61.lib
libboost_log-vc120-mt-1_61.lib
libboost_log_setup-vc120-mt-1_61.lib
libboost_math_c99-vc120-mt-1_61.lib
libboost_math_c99f-vc120-mt-1_61.lib
libboost_math_c99l-vc120-mt-1_61.lib
libboost_math_tr1-vc120-mt-1_61.lib
libboost_math_tr1f-vc120-mt-1_61.lib
libboost_math_tr1l-vc120-mt-1_61.lib
libboost_mpi-vc120-mt-1_61.lib
libboost_prg_exec_monitor-vc120-mt-1_61.lib
libboost_program_options-vc120-mt-1_61.lib
libboost_random-vc120-mt-1_61.lib
libboost_regex-vc120-mt-1_61.lib
libboost_serialization-vc120-mt-1_61.lib
libboost_signals-vc120-mt-1_61.lib
libboost_system-vc120-mt-1_61.lib
libboost_test_exec_monitor-vc120-mt-1_61.lib
libboost_thread-vc120-mt-1_61.lib
libboost_timer-vc120-mt-1_61.lib
libboost_type_erasure-vc120-mt-1_61.lib
libboost_unit_test_framework-vc120-mt-1_61.lib
libboost_wave-vc120-mt-1_61.lib
libboost_wserialization-vc120-mt-1_61.lib
flann_cpp_s.lib
flann_s.lib
flann.lib
qhull.lib
qhull_p.lib
qhull_r.lib
qhullcpp.lib
qhullstatic.lib
qhullstatic_r.lib
vtkChartsCore-7.0.lib
vtkCommonColor-7.0.lib
vtkCommonComputationalGeometry-7.0.lib
vtkCommonCore-7.0.lib
vtkCommonDataModel-7.0.lib
vtkCommonExecutionModel-7.0.lib
vtkCommonMath-7.0.lib
vtkCommonMisc-7.0.lib
vtkCommonSystem-7.0.lib
vtkCommonTransforms-7.0.lib
vtkDICOMParser-7.0.lib
vtkDomainsChemistry-7.0.lib
vtkFiltersAMR-7.0.lib
vtkFiltersCore-7.0.lib
vtkFiltersExtraction-7.0.lib
vtkFiltersFlowPaths-7.0.lib
vtkFiltersGeneral-7.0.lib
vtkFiltersGeneric-7.0.lib
vtkFiltersGeometry-7.0.lib
vtkFiltersHybrid-7.0.lib
vtkFiltersHyperTree-7.0.lib
vtkFiltersImaging-7.0.lib
vtkFiltersModeling-7.0.lib
vtkFiltersParallel-7.0.lib
vtkFiltersParallelImaging-7.0.lib
vtkFiltersProgrammable-7.0.lib
vtkFiltersSMP-7.0.lib
vtkFiltersSelection-7.0.lib
vtkFiltersSources-7.0.lib
vtkFiltersStatistics-7.0.lib
vtkFiltersTexture-7.0.lib
vtkFiltersVerdict-7.0.lib
vtkGeovisCore-7.0.lib
vtkIOAMR-7.0.lib
vtkIOCore-7.0.lib
vtkIOEnSight-7.0.lib
vtkIOExodus-7.0.lib
vtkIOExport-7.0.lib
vtkIOGeometry-7.0.lib
vtkIOImage-7.0.lib
vtkIOImport-7.0.lib
vtkIOInfovis-7.0.lib
vtkIOLSDyna-7.0.lib
vtkIOLegacy-7.0.lib
vtkIOMINC-7.0.lib
vtkIOMovie-7.0.lib
vtkIONetCDF-7.0.lib
vtkIOPLY-7.0.lib
vtkIOParallel-7.0.lib
vtkIOParallelXML-7.0.lib
vtkIOSQL-7.0.lib
vtkIOVideo-7.0.lib
vtkIOXML-7.0.lib
vtkIOXMLParser-7.0.lib
vtkImagingColor-7.0.lib
vtkImagingCore-7.0.lib
vtkImagingFourier-7.0.lib
vtkImagingGeneral-7.0.lib
vtkImagingHybrid-7.0.lib
vtkImagingMath-7.0.lib
vtkImagingMorphological-7.0.lib
vtkImagingSources-7.0.lib
vtkImagingStatistics-7.0.lib
vtkImagingStencil-7.0.lib
vtkInfovisCore-7.0.lib
vtkInfovisLayout-7.0.lib
vtkInteractionImage-7.0.lib
vtkInteractionStyle-7.0.lib
vtkInteractionWidgets-7.0.lib
vtkNetCDF-7.0.lib
vtkNetCDF_cxx-7.0.lib
vtkParallelCore-7.0.lib
vtkRenderingAnnotation-7.0.lib
vtkRenderingContext2D-7.0.lib
vtkRenderingContextOpenGL-7.0.lib
vtkRenderingCore-7.0.lib
vtkRenderingFreeType-7.0.lib
vtkRenderingGL2PS-7.0.lib
vtkRenderingImage-7.0.lib
vtkRenderingLIC-7.0.lib
vtkRenderingLOD-7.0.lib
vtkRenderingLabel-7.0.lib
vtkRenderingOpenGL-7.0.lib
vtkRenderingVolume-7.0.lib
vtkRenderingVolumeOpenGL-7.0.lib
vtkViewsContext2D-7.0.lib
vtkViewsCore-7.0.lib
vtkViewsInfovis-7.0.lib
vtkalglib-7.0.lib
vtkexoIIc-7.0.lib
vtkexpat-7.0.lib
vtkfreetype-7.0.lib
vtkgl2ps-7.0.lib
vtkhdf5-7.0.lib
vtkhdf5_hl-7.0.lib
vtkjpeg-7.0.lib
vtkjsoncpp-7.0.lib
vtklibxml2-7.0.lib
vtkmetaio-7.0.lib
vtkoggtheora-7.0.lib
vtkpng-7.0.lib
vtkproj4-7.0.lib
vtksqlite-7.0.lib
vtksys-7.0.lib
vtktiff-7.0.lib
vtkverdict-7.0.lib
vtkzlib-7.0.lib

注:若附加依赖项添加不正确,在运行程序时会报以下错误
错误 LNK1104 无法打开文件“libboost_atomic-vc120-mt-gd-1_61.lib” project_PCL

6. 其他设置
①编译的时候记得将编译器变为x64的环境下运行,然后估计会报这样的错误:
error C4996: ‘pcl::SAC_SAMPLE_SIZE’: This map is deprecated and is kept only to
prevent breaking existing user…
解决方式:属性"->“C/C++”->“SDL检查”:改为否(/sdl)
②为了防止弹出很多的warning,加入预处理器
在属性目录"C/C++ “– >“预处理器”–>“预处理器定义” 加入:
_SCL_SECURE_NO_WARNINGS
_CRT_SECURE_NO_WARNINGS
PCL_NO_PRECOMPILE
③在Debug下编译会出现大量的如下warning(Release下没有):
warning LNK4099: 未找到 PDB“.pdb”正在链接对象,如同没有调试信息一样
解决方法:“视图”->“解决方案资源管理器”->“属性”->“链接器”->“调试”,在右侧的“生成
调试信息”改为“否”,确定即可。

参考博客:
PCL 1.8.0+VS 2015+CMake的安装配置详细教程
WIN10+VS2015+PCL1.8.1环境安装

  相关解决方案