win10安装配置PCL

安装PCL

前往:https://github.com/PointCloudLibrary/pcl/releases

下载All In One版本(1.10.0)。同时下载对应的pdb压缩包。当然也可以自己下载Source code源码自己编译,但用不惯linux,就直接懒人一键吧。

win10安装配置PCL_第1张图片

双击exe安装,路径,驱动,ok

弹出path too long installer unable to modify path,然后安装就结束了。

去环境变量里看一下,系统变量里只添加了PCL_ROOT,路径是前面自定义的PCL安装路径。

win10安装配置PCL_第2张图片

打开Path,发现里面并没有PCL的相关环境变量。添加以下5项:

%PCL_ROOT%\bin
%PCL_ROOT%\3rdParty\FLANN\bin
%PCL_ROOT%\3rdParty\VTK\bin
%PCL_ROOT%\3rdParty\Qhull\bin
%PCL_ROOT%\3rdParty\OpenNI2\Tools

后来又因为各种原因修改了环境变量:

1.这5项都可以在PCL路径下找到,可以去PCL目录下对照着检查一下,照着一篇博客配置的结果不对,发现是Qhull在3rdParty目录下。不知道是那个博主写错了还是后来版本更新修改了位置。

win10安装配置PCL_第3张图片

还有OpenNI2,我之后在添加lib的时候发现,...\3rdParty\OpenNI2目录里只有一个安装程序,然后我搜索了一下。找到OpenNI2的安装目录在C盘。所以上面的最后一条环境变量需要修改:

C:\Program Files\OpenNI2\Tools

2.见后面dll文件找不到的问题,我将%PCL_ROOT%替换为了绝对路径。

在VS2017中配置PCL

项目->属性

1.C/C++->常规->附加包含目录,添加7项

win10安装配置PCL_第4张图片

2.链接器->常规->附加库目录,添加7项

win10安装配置PCL_第5张图片

3.链接器->输入,附加依赖项,这里要添加的东西就很多了,建议参考:https://www.cnblogs.com/blog-vincent-0x1F7/p/9646358.html,利用bat脚本来生成包含文件名的txt,方便复制。要提一句,在pcl的lib下,因为我的文件和参考的博客里的文件是不同的,参考博客里的文件名末尾是debug和release,而我的debug版本是末尾为d,release版本末尾无d。所以要修改bat脚本的内容,当然很简单,改一下匹配就行了。

win10安装配置PCL_第6张图片

我需要的是debug的lib,所以脚本修改为:(不熟悉bat的写法,但是参考博客里面的注释“//xxx”好像会影响执行,最好删掉)

@echo off
for %%I in (*.lib) do echo %%I>>all.txt
for %%I in (*d.lib) do echo %%I>>debug.txt
pause

其他几个lib文件夹参考博客即可。

(不建议直接复制)列一下我添加的依赖项: 

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-vc141-mt-gd-x64-1_72.lib
libboost_chrono-vc141-mt-gd-x64-1_72.lib
libboost_container-vc141-mt-gd-x64-1_72.lib
libboost_context-vc141-mt-gd-x64-1_72.lib
libboost_contract-vc141-mt-gd-x64-1_72.lib
libboost_coroutine-vc141-mt-gd-x64-1_72.lib
libboost_date_time-vc141-mt-gd-x64-1_72.lib
libboost_exception-vc141-mt-gd-x64-1_72.lib
libboost_fiber-vc141-mt-gd-x64-1_72.lib
libboost_filesystem-vc141-mt-gd-x64-1_72.lib
libboost_graph-vc141-mt-gd-x64-1_72.lib
libboost_iostreams-vc141-mt-gd-x64-1_72.lib
libboost_locale-vc141-mt-gd-x64-1_72.lib
libboost_log-vc141-mt-gd-x64-1_72.lib
libboost_log_setup-vc141-mt-gd-x64-1_72.lib
libboost_math_c99-vc141-mt-gd-x64-1_72.lib
libboost_math_c99f-vc141-mt-gd-x64-1_72.lib
libboost_math_c99l-vc141-mt-gd-x64-1_72.lib
libboost_math_tr1-vc141-mt-gd-x64-1_72.lib
libboost_math_tr1f-vc141-mt-gd-x64-1_72.lib
libboost_math_tr1l-vc141-mt-gd-x64-1_72.lib
libboost_numpy37-vc141-mt-gd-x64-1_72.lib
libboost_prg_exec_monitor-vc141-mt-gd-x64-1_72.lib
libboost_program_options-vc141-mt-gd-x64-1_72.lib
libboost_python37-vc141-mt-gd-x64-1_72.lib
libboost_random-vc141-mt-gd-x64-1_72.lib
libboost_regex-vc141-mt-gd-x64-1_72.lib
libboost_serialization-vc141-mt-gd-x64-1_72.lib
libboost_stacktrace_noop-vc141-mt-gd-x64-1_72.lib
libboost_stacktrace_windbg-vc141-mt-gd-x64-1_72.lib
libboost_stacktrace_windbg_cached-vc141-mt-gd-x64-1_72.lib
libboost_system-vc141-mt-gd-x64-1_72.lib
libboost_test_exec_monitor-vc141-mt-gd-x64-1_72.lib
libboost_thread-vc141-mt-gd-x64-1_72.lib
libboost_timer-vc141-mt-gd-x64-1_72.lib
libboost_type_erasure-vc141-mt-gd-x64-1_72.lib
libboost_unit_test_framework-vc141-mt-gd-x64-1_72.lib
libboost_wave-vc141-mt-gd-x64-1_72.lib
libboost_wserialization-vc141-mt-gd-x64-1_72.lib
OpenNI2.lib
flann-gd.lib
flann_cpp-gd.lib
flann_cpp_s-gd.lib
flann_s-gd.lib
qhullcpp_d.lib
qhullstatic_d.lib
qhullstatic_r_d.lib
qhull_d.lib
qhull_p_d.lib
qhull_r_d.lib
vtkChartsCore-8.2-gd.lib
vtkCommonColor-8.2-gd.lib
vtkCommonComputationalGeometry-8.2-gd.lib
vtkCommonCore-8.2-gd.lib
vtkCommonDataModel-8.2-gd.lib
vtkCommonExecutionModel-8.2-gd.lib
vtkCommonMath-8.2-gd.lib
vtkCommonMisc-8.2-gd.lib
vtkCommonSystem-8.2-gd.lib
vtkCommonTransforms-8.2-gd.lib
vtkDICOMParser-8.2-gd.lib
vtkDomainsChemistry-8.2-gd.lib
vtkDomainsChemistryOpenGL2-8.2-gd.lib
vtkdoubleconversion-8.2-gd.lib
vtkexodusII-8.2-gd.lib
vtkexpat-8.2-gd.lib
vtkFiltersAMR-8.2-gd.lib
vtkFiltersCore-8.2-gd.lib
vtkFiltersExtraction-8.2-gd.lib
vtkFiltersFlowPaths-8.2-gd.lib
vtkFiltersGeneral-8.2-gd.lib
vtkFiltersGeneric-8.2-gd.lib
vtkFiltersGeometry-8.2-gd.lib
vtkFiltersHybrid-8.2-gd.lib
vtkFiltersHyperTree-8.2-gd.lib
vtkFiltersImaging-8.2-gd.lib
vtkFiltersModeling-8.2-gd.lib
vtkFiltersParallel-8.2-gd.lib
vtkFiltersParallelImaging-8.2-gd.lib
vtkFiltersPoints-8.2-gd.lib
vtkFiltersProgrammable-8.2-gd.lib
vtkFiltersSelection-8.2-gd.lib
vtkFiltersSMP-8.2-gd.lib
vtkFiltersSources-8.2-gd.lib
vtkFiltersStatistics-8.2-gd.lib
vtkFiltersTexture-8.2-gd.lib
vtkFiltersTopology-8.2-gd.lib
vtkFiltersVerdict-8.2-gd.lib
vtkfreetype-8.2-gd.lib
vtkGeovisCore-8.2-gd.lib
vtkgl2ps-8.2-gd.lib
vtkglew-8.2-gd.lib
vtkGUISupportMFC-8.2-gd.lib
vtkhdf5-8.2-gd.lib
vtkhdf5_hl-8.2-gd.lib
vtkImagingColor-8.2-gd.lib
vtkImagingCore-8.2-gd.lib
vtkImagingFourier-8.2-gd.lib
vtkImagingGeneral-8.2-gd.lib
vtkImagingHybrid-8.2-gd.lib
vtkImagingMath-8.2-gd.lib
vtkImagingMorphological-8.2-gd.lib
vtkImagingSources-8.2-gd.lib
vtkImagingStatistics-8.2-gd.lib
vtkImagingStencil-8.2-gd.lib
vtkInfovisCore-8.2-gd.lib
vtkInfovisLayout-8.2-gd.lib
vtkInteractionImage-8.2-gd.lib
vtkInteractionStyle-8.2-gd.lib
vtkInteractionWidgets-8.2-gd.lib
vtkIOAMR-8.2-gd.lib
vtkIOAsynchronous-8.2-gd.lib
vtkIOCityGML-8.2-gd.lib
vtkIOCore-8.2-gd.lib
vtkIOEnSight-8.2-gd.lib
vtkIOExodus-8.2-gd.lib
vtkIOExport-8.2-gd.lib
vtkIOExportOpenGL2-8.2-gd.lib
vtkIOExportPDF-8.2-gd.lib
vtkIOGeometry-8.2-gd.lib
vtkIOImage-8.2-gd.lib
vtkIOImport-8.2-gd.lib
vtkIOInfovis-8.2-gd.lib
vtkIOLegacy-8.2-gd.lib
vtkIOLSDyna-8.2-gd.lib
vtkIOMINC-8.2-gd.lib
vtkIOMovie-8.2-gd.lib
vtkIONetCDF-8.2-gd.lib
vtkIOParallel-8.2-gd.lib
vtkIOParallelXML-8.2-gd.lib
vtkIOPLY-8.2-gd.lib
vtkIOSegY-8.2-gd.lib
vtkIOSQL-8.2-gd.lib
vtkIOTecplotTable-8.2-gd.lib
vtkIOVeraOut-8.2-gd.lib
vtkIOVideo-8.2-gd.lib
vtkIOXML-8.2-gd.lib
vtkIOXMLParser-8.2-gd.lib
vtkjpeg-8.2-gd.lib
vtkjsoncpp-8.2-gd.lib
vtklibharu-8.2-gd.lib
vtklibxml2-8.2-gd.lib
vtklz4-8.2-gd.lib
vtklzma-8.2-gd.lib
vtkmetaio-8.2-gd.lib
vtkNetCDF-8.2-gd.lib
vtkogg-8.2-gd.lib
vtkParallelCore-8.2-gd.lib
vtkpng-8.2-gd.lib
vtkproj-8.2-gd.lib
vtkpugixml-8.2-gd.lib
vtkRenderingAnnotation-8.2-gd.lib
vtkRenderingContext2D-8.2-gd.lib
vtkRenderingContextOpenGL2-8.2-gd.lib
vtkRenderingCore-8.2-gd.lib
vtkRenderingExternal-8.2-gd.lib
vtkRenderingFreeType-8.2-gd.lib
vtkRenderingGL2PSOpenGL2-8.2-gd.lib
vtkRenderingImage-8.2-gd.lib
vtkRenderingLabel-8.2-gd.lib
vtkRenderingLOD-8.2-gd.lib
vtkRenderingOpenGL2-8.2-gd.lib
vtkRenderingVolume-8.2-gd.lib
vtkRenderingVolumeOpenGL2-8.2-gd.lib
vtksqlite-8.2-gd.lib
vtksys-8.2-gd.lib
vtktheora-8.2-gd.lib
vtktiff-8.2-gd.lib
vtkverdict-8.2-gd.lib
vtkViewsContext2D-8.2-gd.lib
vtkViewsCore-8.2-gd.lib
vtkViewsInfovis-8.2-gd.lib
vtkzlib-8.2-gd.lib

运行demo时遇到的错误 

LINK : fatal error LNK1104: 无法打开文件“libboost_filesystem-vc141-mt-gd-x64-1_72.lib”

 LINK : fatal error LNK1104: 无法打开文件“libboost_filesystem-vc141-mt-sgd-x64-1_72.lib”

https://blog.csdn.net/Vikanill/article/details/107057309

由于找不到vcruntime140_1d.dll,无法继续执行代码

这个报错网上很常见了,一搜一大把,只要去下一个vcruntime140_1d.dll然后放到C:\Windows\System32(64位)

找不到pcl_iod.dll

找不到pcl_commond.dll

去pcl-版本/bin目录下,能够找到这两个dll文件,修改了一下环境变量,把里面的%PCL_ROOT%换成了绝对路径。

win10安装配置PCL_第7张图片

你可能感兴趣的:(PCL,PCL)