1.从官网下载PCL:https://github.com/PointCloudLibrary/pcl/releases
下载这两个文件就行
2.安装
运行下载好的exe进行安装,注意这一步要选第二个添加到系统变量,一直下一步安装到默认路径即可:
我这里安装的时候选成了第一个,但是没关系,安装好后再系统变量的 Path 里添加:
然后打开C:\Program Files\PCL 1.11.1\3rdParty\OpenNI2 目录下的msi文件,也安装到此目录下即可,安装完成后的目录是这样的:
解压下载的第二个文件pcl-1.11.1-pdb-msvc2019-win64.zip, 将所有pdb文件复制粘贴到C:\Program Files\PCL 1.11.1\bin目录下,点击替换。
然后在系统变量里的用户变量的Path中添加:
%PCL_ROOT%\3rdParty\FLANN\bin %PCL_ROOT%\3rdParty\VTK\bin %OPENNI2_REDIST64% %OPENNI2_LIB64% %OPENNI2_INCLUDE64%
至此,环境变量即配置完成.
3.VS配置
在项目中将解决方案配置设置为Release,平台选x64,点击项目 / 属性 / VC++目录 / 包含目录,添加:
C:\Program Files\PCL 1.11.1\include\pcl-1.11 C:\Program Files\PCL 1.11.1\3rdParty\Boost\include\boost-1_74 C:\Program Files\PCL 1.11.1\3rdParty\Eigen\eigen3 C:\Program Files\PCL 1.11.1\3rdParty\FLANN\include C:\Program Files\PCL 1.11.1\3rdParty\OpenNI2\Include C:\Program Files\PCL 1.11.1\3rdParty\Qhull\include C:\Program Files\PCL 1.11.1\3rdParty\VTK\include\vtk-8.2
点击项目 / 属性 / VC++目录 / 库目录,添加:
C:\Program Files\PCL 1.11.1\lib C:\Program Files\PCL 1.11.1\3rdParty\Boost\lib C:\Program Files\PCL 1.11.1\3rdParty\FLANN\lib C:\Program Files\PCL 1.11.1\3rdParty\OpenNI2\Lib C:\Program Files\PCL 1.11.1\3rdParty\Qhull\lib C:\Program Files\PCL 1.11.1\3rdParty\VTK\lib
然后在C/C++ / 预处理器 / 预处理器定义 下添加:
BOOST_USE_WINDOWS_H NOMINMAX _CRT_SECURE_NO_DEPRECATE
链接器 / 输入 / 附加依赖项 添加,注意这是Release版本:
pcl_common.lib pcl_features.lib pcl_filters.lib pcl_io.lib pcl_io_ply.lib pcl_kdtree.lib pcl_keypoints.lib pcl_ml.lib pcl_octree.lib pcl_outofcore.lib pcl_people.lib pcl_recognition.lib pcl_registration.lib pcl_sample_consensus.lib pcl_search.lib pcl_segmentation.lib pcl_stereo.lib pcl_surface.lib pcl_tracking.lib pcl_visualization.lib vtkChartsCore-8.2.lib vtkCommonColor-8.2.lib vtkCommonComputationalGeometry-8.2.lib vtkCommonCore-8.2.lib vtkCommonDataModel-8.2.lib vtkCommonExecutionModel-8.2.lib vtkCommonMath-8.2.lib vtkCommonMisc-8.2.lib vtkCommonSystem-8.2.lib vtkCommonTransforms-8.2.lib vtkDICOMParser-8.2.lib vtkDomainsChemistry-8.2.lib vtkDomainsChemistryOpenGL2-8.2.lib vtkdoubleconversion-8.2.lib vtkexodusII-8.2.lib vtkexpat-8.2.lib vtkFiltersAMR-8.2.lib vtkFiltersCore-8.2.lib vtkFiltersExtraction-8.2.lib vtkFiltersFlowPaths-8.2.lib vtkFiltersGeneral-8.2.lib vtkFiltersGeneric-8.2.lib vtkFiltersGeometry-8.2.lib vtkFiltersHybrid-8.2.lib vtkFiltersHyperTree-8.2.lib vtkFiltersImaging-8.2.lib vtkFiltersModeling-8.2.lib vtkFiltersParallel-8.2.lib vtkFiltersParallelImaging-8.2.lib vtkFiltersPoints-8.2.lib vtkFiltersProgrammable-8.2.lib vtkFiltersSelection-8.2.lib vtkFiltersSMP-8.2.lib vtkFiltersSources-8.2.lib vtkFiltersStatistics-8.2.lib vtkFiltersTexture-8.2.lib vtkFiltersTopology-8.2.lib vtkFiltersVerdict-8.2.lib vtkfreetype-8.2.lib vtkGeovisCore-8.2.lib vtkgl2ps-8.2.lib vtkglew-8.2.lib vtkGUISupportMFC-8.2.lib vtkhdf5-8.2.lib vtkhdf5_hl-8.2.lib vtkImagingColor-8.2.lib vtkImagingCore-8.2.lib vtkImagingFourier-8.2.lib vtkImagingGeneral-8.2.lib vtkImagingHybrid-8.2.lib vtkImagingMath-8.2.lib vtkImagingMorphological-8.2.lib vtkImagingSources-8.2.lib vtkImagingStatistics-8.2.lib vtkImagingStencil-8.2.lib vtkInfovisCore-8.2.lib vtkInfovisLayout-8.2.lib vtkInteractionImage-8.2.lib vtkInteractionStyle-8.2.lib vtkInteractionWidgets-8.2.lib vtkIOAMR-8.2.lib vtkIOAsynchronous-8.2.lib vtkIOCityGML-8.2.lib vtkIOCore-8.2.lib vtkIOEnSight-8.2.lib vtkIOExodus-8.2.lib vtkIOExport-8.2.lib vtkIOExportOpenGL2-8.2.lib vtkIOExportPDF-8.2.lib vtkIOGeometry-8.2.lib vtkIOImage-8.2.lib vtkIOImport-8.2.lib vtkIOInfovis-8.2.lib vtkIOLegacy-8.2.lib vtkIOLSDyna-8.2.lib vtkIOMINC-8.2.lib vtkIOMovie-8.2.lib vtkIONetCDF-8.2.lib vtkIOParallel-8.2.lib vtkIOParallelXML-8.2.lib vtkIOPLY-8.2.lib vtkIOSegY-8.2.lib vtkIOSQL-8.2.lib vtkIOTecplotTable-8.2.lib vtkIOVeraOut-8.2.lib vtkIOVideo-8.2.lib vtkIOXML-8.2.lib vtkIOXMLParser-8.2.lib vtkjpeg-8.2.lib vtkjsoncpp-8.2.lib vtklibharu-8.2.lib vtklibxml2-8.2.lib vtklz4-8.2.lib vtklzma-8.2.lib vtkmetaio-8.2.lib vtkNetCDF-8.2.lib vtkogg-8.2.lib vtkParallelCore-8.2.lib vtkpng-8.2.lib vtkproj-8.2.lib vtkpugixml-8.2.lib vtkRenderingAnnotation-8.2.lib vtkRenderingContext2D-8.2.lib vtkRenderingContextOpenGL2-8.2.lib vtkRenderingCore-8.2.lib vtkRenderingExternal-8.2.lib vtkRenderingFreeType-8.2.lib vtkRenderingGL2PSOpenGL2-8.2.lib vtkRenderingImage-8.2.lib vtkRenderingLabel-8.2.lib vtkRenderingLOD-8.2.lib vtkRenderingOpenGL2-8.2.lib vtkRenderingVolume-8.2.lib vtkRenderingVolumeOpenGL2-8.2.lib vtksqlite-8.2.lib vtksys-8.2.lib vtktheora-8.2.lib vtktiff-8.2.lib vtkverdict-8.2.lib vtkViewsContext2D-8.2.lib vtkViewsCore-8.2.lib vtkViewsInfovis-8.2.lib vtkzlib-8.2.lib
配好之后,再运行项目的话还是会报找不到OpenNI2的错误,我们再在 项目 / 属性 / 调试 / 环境里添加:
PATH=C:\Program Files\PCL 1.11.1\\bin;C:\Program Files\PCL 1.11.1\\3rdParty\FLANN\bin;C:\Program Files\PCL 1.11.1\\3rdParty\VTK\bin;C:\Program Files\PCL 1.11.1\\3rdParty\OpenNI2\Tools
这样基本就大功告成了!
标签:Files,8.2,PCL,lib,VS2019,1.11,pcl From: https://www.cnblogs.com/zxc0210/p/17731576.html