1.下载安装配置PCL环境(略)
2.vs2022相关配置(第一次配置时,不想手动配置的,直接看第3条,用我的.props属性表直接导入即可。)
1)新建一个C++项目,右击项目,选择属性(最下面),第一行配置中选择版本,我的是debug x64。
2)点击配置属性下的VC++目录,点击包含目录,然后编辑,添加PCL相关目录(更换成自己的安装目录),以下是我本人的安装目录include部分:
C:\PCL1.13.1\3rdParty\Boost\include\boost-1_82
C:\PCL1.13.1\3rdParty\Eigen\eigen3
C:\PCL1.13.1\3rdParty\OpenNI2\Include
C:\PCL1.13.1\3rdParty\FLANN\include
C:\PCL1.13.1\3rdParty\Qhull\include
C:\PCL1.13.1\3rdParty\VTK\include\vtk-9.2
C:\PCL1.13.1\include\pcl-1.13
C:\PCL1.13.1\bin
3)点开在本项下面的库目录,然后编辑,添加lib文件夹部分:
C:\PCL1.13.1\3rdParty\OpenNI2\Lib
C:\PCL1.13.1\3rdParty\VTK\lib
C:\PCL1.13.1\3rdParty\Qhull\lib
C:\PCL1.13.1\3rdParty\FLANN\lib
C:\PCL1.13.1\3rdParty\Boost\lib
C:\PCL1.13.1\lib
4)点击链接器,打开输入,编辑附加依赖项(如果不方便复制可在资源下载txt文件):
pcl_commond.lib
pcl_featuresd.lib
pcl_filtersd.lib
pcl_iod.lib
pcl_io_plyd.lib
pcl_kdtreed.lib
pcl_keypointsd.lib
pcl_mld.lib
pcl_octreed.lib
pcl_outofcored.lib
pcl_peopled.lib
pcl_recognitiond.lib
pcl_registrationd.lib
pcl_sample_consensusd.lib
pcl_searchd.lib
pcl_segmentationd.lib
pcl_stereod.lib
pcl_surfaced.lib
pcl_trackingd.lib
pcl_visualizationd.lib
libboost_atomic-vc143-mt-gd-x64-1_82.lib
libboost_bzip2-vc143-mt-gd-x64-1_82.lib
libboost_chrono-vc143-mt-gd-x64-1_82.lib
libboost_container-vc143-mt-gd-x64-1_82.lib
libboost_context-vc143-mt-gd-x64-1_82.lib
libboost_contract-vc143-mt-gd-x64-1_82.lib
libboost_coroutine-vc143-mt-gd-x64-1_82.lib
libboost_date_time-vc143-mt-gd-x64-1_82.lib
libboost_exception-vc143-mt-gd-x64-1_82.lib
libboost_filesystem-vc143-mt-gd-x64-1_82.lib
libboost_graph-vc143-mt-gd-x64-1_82.lib
libboost_graph_parallel-vc143-mt-gd-x64-1_82.lib
libboost_iostreams-vc143-mt-gd-x64-1_82.lib
libboost_json-vc143-mt-gd-x64-1_82.lib
libboost_locale-vc143-mt-gd-x64-1_82.lib
libboost_log-vc143-mt-gd-x64-1_82.lib
libboost_log_setup-vc143-mt-gd-x64-1_82.lib
libboost_math_c99-vc143-mt-gd-x64-1_82.lib
libboost_math_c99f-vc143-mt-gd-x64-1_82.lib
libboost_math_c99l-vc143-mt-gd-x64-1_82.lib
libboost_math_tr1-vc143-mt-gd-x64-1_82.lib
libboost_math_tr1f-vc143-mt-gd-x64-1_82.lib
libboost_math_tr1l-vc143-mt-gd-x64-1_82.lib
libboost_mpi-vc143-mt-gd-x64-1_82.lib
libboost_nowide-vc143-mt-gd-x64-1_82.lib
libboost_numpy310-vc143-mt-gd-x64-1_82.lib
libboost_prg_exec_monitor-vc143-mt-gd-x64-1_82.lib
libboost_program_options-vc143-mt-gd-x64-1_82.lib
libboost_python310-vc143-mt-gd-x64-1_82.lib
libboost_random-vc143-mt-gd-x64-1_82.lib
libboost_regex-vc143-mt-gd-x64-1_82.lib
libboost_serialization-vc143-mt-gd-x64-1_82.lib
libboost_system-vc143-mt-gd-x64-1_82.lib
libboost_test_exec_monitor-vc143-mt-gd-x64-1_82.lib
libboost_thread-vc143-mt-gd-x64-1_82.lib
libboost_timer-vc143-mt-gd-x64-1_82.lib
libboost_type_erasure-vc143-mt-gd-x64-1_82.lib
libboost_unit_test_framework-vc143-mt-gd-x64-1_82.lib
libboost_wave-vc143-mt-gd-x64-1_82.lib
libboost_wserialization-vc143-mt-gd-x64-1_82.lib
libboost_zlib-vc143-mt-gd-x64-1_82.lib
flann-gd.lib
flann_cpp-gd.lib
flann_cpp_s-gd.lib
flann_s-gd.lib
OpenNI2.lib
qhullcpp_d.lib
qhullstatic_d.lib
qhullstatic_rd.lib
qhull_rd.lib
vtkcgns-9.2.lib
vtkcgns-9.2-gd.lib
vtkChartsCore-9.2-gd.lib
vtkCommonColor-9.2-gd.lib
vtkCommonComputationalGeometry-9.2-gd.lib
vtkCommonCore-9.2-gd.lib
vtkCommonDataModel-9.2-gd.lib
vtkCommonExecutionModel-9.2-gd.lib
vtkCommonMath-9.2-gd.lib
vtkCommonMisc-9.2-gd.lib
vtkCommonSystem-9.2-gd.lib
vtkCommonTransforms-9.2-gd.lib
vtkDICOMParser-9.2-gd.lib
vtkDomainsChemistry-9.2-gd.lib
vtkDomainsChemistryOpenGL2-9.2-gd.lib
vtkdoubleconversion-9.2-gd.lib
vtkexodusII-9.2-gd.lib
vtkexpat-9.2-gd.lib
vtkFiltersAMR-9.2-gd.lib
vtkFiltersCore-9.2-gd.lib
vtkFiltersExtraction-9.2-gd.lib
vtkFiltersFlowPaths-9.2-gd.lib
vtkFiltersGeneral-9.2-gd.lib
vtkFiltersGeneric-9.2-gd.lib
vtkFiltersGeometry-9.2-gd.lib
vtkFiltersHybrid-9.2-gd.lib
vtkFiltersHyperTree-9.2-gd.lib
vtkFiltersImaging-9.2-gd.lib
vtkFiltersModeling-9.2-gd.lib
vtkFiltersParallel-9.2-gd.lib
vtkFiltersParallelImaging-9.2-gd.lib
vtkFiltersPoints-9.2-gd.lib
vtkFiltersProgrammable-9.2-gd.lib
vtkFiltersSelection-9.2-gd.lib
vtkFiltersSMP-9.2-gd.lib
vtkFiltersSources-9.2-gd.lib
vtkFiltersStatistics-9.2-gd.lib
vtkFiltersTexture-9.2-gd.lib
vtkFiltersTopology-9.2-gd.lib
vtkFiltersVerdict-9.2-gd.lib
vtkfmt-9.2-gd.lib
vtkfreetype-9.2-gd.lib
vtkGeovisCore-9.2-gd.lib
vtkgl2ps-9.2-gd.lib
vtkglew-9.2-gd.lib
vtkhdf5-9.2-gd.lib
vtkhdf5_hl-9.2-gd.lib
vtkImagingColor-9.2-gd.lib
vtkImagingCore-9.2-gd.lib
vtkImagingFourier-9.2-gd.lib
vtkImagingGeneral-9.2-gd.lib
vtkImagingHybrid-9.2-gd.lib
vtkImagingMath-9.2-gd.lib
vtkImagingMorphological-9.2-gd.lib
vtkImagingSources-9.2-gd.lib
vtkImagingStatistics-9.2-gd.lib
vtkImagingStencil-9.2-gd.lib
vtkInfovisCore-9.2-gd.lib
vtkInfovisLayout-9.2-gd.lib
vtkInteractionImage-9.2-gd.lib
vtkInteractionStyle-9.2-gd.lib
vtkInteractionWidgets-9.2-gd.lib
vtkIOAMR-9.2-gd.lib
vtkIOAsynchronous-9.2-gd.lib
vtkIOCGNSReader-9.2-gd.lib
vtkIOChemistry-9.2-gd.lib
vtkIOCityGML-9.2-gd.lib
vtkIOCONVERGECFD-9.2-gd.lib
vtkIOCore-9.2-gd.lib
vtkIOEnSight-9.2-gd.lib
vtkIOExodus-9.2-gd.lib
vtkIOExport-9.2-gd.lib
vtkIOExportGL2PS-9.2-gd.lib
vtkIOExportPDF-9.2-gd.lib
vtkIOGeometry-9.2-gd.lib
vtkIOHDF-9.2-gd.lib
vtkIOImage-9.2-gd.lib
vtkIOImport-9.2-gd.lib
vtkIOInfovis-9.2-gd.lib
vtkIOIOSS-9.2-gd.lib
vtkIOLegacy-9.2-gd.lib
vtkIOLSDyna-9.2-gd.lib
vtkIOMINC-9.2-gd.lib
vtkIOMotionFX-9.2-gd.lib
vtkIOMovie-9.2-gd.lib
vtkIONetCDF-9.2-gd.lib
vtkIOOggTheora-9.2-gd.lib
vtkIOParallel-9.2-gd.lib
vtkIOParallelXML-9.2-gd.lib
vtkIOPLY-9.2-gd.lib
vtkIOSegY-9.2-gd.lib
vtkIOSQL-9.2-gd.lib
vtkioss-9.2-gd.lib
vtkIOTecplotTable-9.2-gd.lib
vtkIOVeraOut-9.2-gd.lib
vtkIOVideo-9.2-gd.lib
vtkIOXML-9.2-gd.lib
vtkIOXMLParser-9.2-gd.lib
vtkjpeg-9.2-gd.lib
vtkjsoncpp-9.2-gd.lib
vtkkissfft-9.2-gd.lib
vtklibharu-9.2-gd.lib
vtklibproj-9.2-gd.lib
vtklibxml2-9.2-gd.lib
vtkloguru-9.2-gd.lib
vtklz4-9.2-gd.lib
vtklzma-9.2-gd.lib
vtkmetaio-9.2-gd.lib
vtknetcdf-9.2-gd.lib
vtkogg-9.2-gd.lib
vtkParallelCore-9.2-gd.lib
vtkParallelDIY-9.2-gd.lib
vtkpng-9.2-gd.lib
vtkpugixml-9.2-gd.lib
vtkRenderingAnnotation-9.2-gd.lib
vtkRenderingContext2D-9.2-gd.lib
vtkRenderingContextOpenGL2-9.2-gd.lib
vtkRenderingCore-9.2-gd.lib
vtkRenderingFreeType-9.2-gd.lib
vtkRenderingGL2PSOpenGL2-9.2-gd.lib
vtkRenderingImage-9.2-gd.lib
vtkRenderingLabel-9.2-gd.lib
vtkRenderingLOD-9.2-gd.lib
vtkRenderingOpenGL2-9.2-gd.lib
vtkRenderingSceneGraph-9.2-gd.lib
vtkRenderingUI-9.2-gd.lib
vtkRenderingVolume-9.2-gd.lib
vtkRenderingVolumeOpenGL2-9.2-gd.lib
vtkRenderingVtkJS-9.2-gd.lib
vtksqlite-9.2-gd.lib
vtksys-9.2-gd.lib
vtkTestingRendering-9.2-gd.lib
vtktheora-9.2-gd.lib
vtktiff-9.2-gd.lib
vtkverdict-9.2-gd.lib
vtkViewsContext2D-9.2-gd.lib
vtkViewsCore-9.2-gd.lib
vtkViewsInfovis-9.2-gd.lib
vtkWrappingTools-9.2-gd.lib
vtkzlib-9.2-gd.lib
3.当然可以直接在属性中添加已有.props属性表进行配置(前提已有属性表配置),这样在以后的项目中不需要重复设置配置。(视图——>其他窗口——>属性管理器)
在资源中下载我的.props属性表可以。