1.官网下载pcl,添加环境变量,参考我另一篇博客vs配置pcl
2.下载qt,注意这里下载vs编译器的qt,痛苦回忆,电脑有两种版本qt,配置很久都不成功,最后是编译器的原因
3.打开qt,新建一个一个pro项目,在Pro文件添加下面内容:
INCLUDEPATH += E:\PCL1.8.0\3rdParty\OpenNI2\Include\
INCLUDEPATH += E:\PCL1.8.0\include\pcl-1.8\
INCLUDEPATH += E:\PCL1.8.0\3rdParty\Boost\include\boost-1_59\
INCLUDEPATH += E:\PCL1.8.0\3rdParty\Eigen\eigen3\
INCLUDEPATH += E:\PCL1.8.0\3rdParty\FLANN\include\
INCLUDEPATH += E:\PCL1.8.0\3rdParty\Qhull\include\
INCLUDEPATH += E:\PCL1.8.0\3rdParty\VTK\include\vtk-7.0\
CONFIG(debug,debug | release ){
LIBS += -LE:\PCL1.8.0\lib\ -lpcl_common_debug -lpcl_features_debug
LIBS += E:\PCL1.8.0\lib\pcl_filters_debug.lib\
E:\PCL1.8.0\lib\pcl_io_debug.lib\
E:\PCL1.8.0\lib\pcl_io_ply_debug.lib\
E:\PCL1.8.0\lib\pcl_kdtree_debug.lib\
E:\PCL1.8.0\lib\pcl_keypoints_debug.lib\
E:\PCL1.8.0\lib\pcl_ml_debug.lib\
E:\PCL1.8.0\lib\pcl_octree_debug.lib\
E:\PCL1.8.0\lib\pcl_outofcore_debug.lib\
E:\PCL1.8.0\lib\pcl_people_debug.lib\
E:\PCL1.8.0\lib\pcl_recognition_debug.lib\
E:\PCL1.8.0\lib\pcl_registration_debug.lib\
E:\PCL1.8.0\lib\pcl_sample_consensus_debug.lib\
E:\PCL1.8.0\lib\pcl_search_debug.lib\
E:\PCL1.8.0\lib\pcl_segmentation_debug.lib\
E:\PCL1.8.0\lib\pcl_stereo_debug.lib\
E:\PCL1.8.0\lib\pcl_surface_debug.lib\
E:\PCL1.8.0\lib\pcl_tracking_debug.lib\
E:\PCL1.8.0\lib\pcl_visualization_debug.lib\
LIBS += E:\PCL1.8.0\3rdParty\Boost\lib\libboost_atomic-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_chrono-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_container-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_context-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_coroutine-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_date_time-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_exception-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_filesystem-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_graph-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_iostreams-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_locale-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_log_setup-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_log-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_math_c99f-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_math_c99l-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_math_c99-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_math_tr1f-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_math_tr1l-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_math_tr1-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_mpi-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_prg_exec_monitor-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_program_options-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_random-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_regex-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_serialization-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_signals-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_system-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_test_exec_monitor-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_thread-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_timer-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_unit_test_framework-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_wave-vc120-mt-gd-1_59.lib\
E:\PCL1.8.0\3rdParty\Boost\lib\libboost_wserialization-vc120-mt-gd-1_59.lib\
LIBS += E:\PCL1.8.0\3rdParty\FLANN\lib\flann_cpp_s-gd.lib\
E:\PCL1.8.0\3rdParty\FLANN\lib\flann_s-gd.lib\
E:\PCL1.8.0\3rdParty\FLANN\lib\flann-gd.lib\
LIBS += E:\PCL1.8.0\3rdParty\OpenNI2\Lib\OpenNI2.lib\
LIBS += E:\PCL1.8.0\3rdParty\Qhull\lib\qhull_p-gd.lib\
E:\PCL1.8.0\3rdParty\Qhull\lib\qhull_r-gd.lib\
E:\PCL1.8.0\3rdParty\Qhull\lib\qhullcpp-gd.lib\
E:\PCL1.8.0\3rdParty\Qhull\lib\qhull-gd.lib\
E:\PCL1.8.0\3rdParty\Qhull\lib\qhullstatic_r-gd.lib\
E:\PCL1.8.0\3rdParty\Qhull\lib\qhullstatic-gd.lib\
LIBS += E:\PCL1.8.0\3rdParty\VTK\lib\vtkalglib-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkChartsCore-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkCommonColor-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkCommonComputationalGeometry-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkCommonCore-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkCommonDataModel-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkCommonExecutionModel-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkCommonMath-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkCommonMisc-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkCommonSystem-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkCommonTransforms-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkDICOMParser-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkDomainsChemistry-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkDomainsChemistryOpenGL2-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkexoIIc-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkexpat-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkFiltersAMR-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkFiltersCore-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkFiltersExtraction-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkFiltersFlowPaths-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkFiltersGeneral-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkFiltersGeneric-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkFiltersGeometry-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkFiltersHybrid-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkFiltersHyperTree-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkFiltersImaging-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkFiltersModeling-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkFiltersParallel-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkFiltersParallelImaging-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkFiltersProgrammable-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkFiltersSelection-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkFiltersSMP-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkFiltersSources-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkFiltersStatistics-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkFiltersTexture-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkFiltersVerdict-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkfreetype-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkGeovisCore-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkglew-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkGUISupportQt-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkGUISupportQtSQL-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkhdf5_hl-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkhdf5-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkImagingColor-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkImagingCore-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkImagingFourier-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkImagingGeneral-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkImagingHybrid-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkImagingMath-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkImagingMorphological-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkImagingSources-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkImagingStatistics-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkImagingStencil-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkInfovisCore-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkInfovisLayout-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkInteractionImage-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkInteractionStyle-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkInteractionWidgets-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkIOAMR-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkIOCore-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkIOEnSight-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkIOExodus-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkIOExport-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkIOGeometry-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkIOImage-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkIOImport-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkIOInfovis-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkIOLegacy-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkIOLSDyna-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkIOMINC-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkIOMovie-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkIONetCDF-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkIOParallel-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkIOParallelXML-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkIOPLY-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkIOSQL-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkIOVideo-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkIOXML-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkIOXMLParser-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkjpeg-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkjsoncpp-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtklibxml2-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkmetaio-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkNetCDF_cxx-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkNetCDF-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkoggtheora-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkParallelCore-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkpng-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkproj4-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkRenderingAnnotation-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkRenderingContext2D-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkRenderingContextOpenGL2-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkRenderingCore-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkRenderingFreeType-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkRenderingImage-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkRenderingLabel-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkRenderingLOD-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkRenderingOpenGL2-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkRenderingQt-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkRenderingVolume-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkRenderingVolumeOpenGL2-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtksqlite-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtksys-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtktiff-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkverdict-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkViewsContext2D-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkViewsCore-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkViewsInfovis-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkViewsQt-7.0-gd.lib\
E:\PCL1.8.0\3rdParty\VTK\lib\vtkzlib-7.0-gd.lib\
}else{
}
路径换成自己安装的路径即可
4.点击构建,执行qmake,配置完成