本文介绍了使用Visual Studio 2017的点云库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在Microsoft Visual Studio 2017中使用点云库.

I'm having trouble using Point Cloud Library with Microsoft Visual Studio 2017.

我已经安装了[PCL-1.8.1-AllInOne-msvc2017-win64.exe],并且已经按照提到的步骤进行操作此处.将其链接到我的Visual Studio 2017项目.

I have installed [PCL-1.8.1-AllInOne-msvc2017-win64.exe] and I've followed the steps mentionedhere. to link it to my Visual Studio 2017 project.

我的问题是Visual Studio找不到我所需的库的头文件或源文件.我收到的错误如下:[致命错误C1083:无法打开包含文件:'pcl/io/pcd_io.h':没有此类文件或目录]

My problem is that Visual Studio is not finding the header nor the source files of the library I need.The error I'm getting is as follows:[fatal error C1083: Cannot open include file: 'pcl/io/pcd_io.h': No such file or directory]

要更精确地解决我的问题,我需要包括三个PCL头文件才能运行此文件.迭代最近点教程

To be more precise about my problem, I need to include three PCL header files in order to run thisIterative Closest Point Tutorial

我已按照以下步骤将PCL包含到我的项目中:

I've followed the following steps to include the PCL into my project:

  • 在项目属性/配置属性/VC ++目录/包含目录"字段中向我的项目添加了包含目录-在这里,我指定了我的PCL/include目录和所有第三方包含目录(PCL/3rdParty)的路径
  • 在相同的设置页面(库目录"字段)上添加了库目录-在这里,我指定了我的PCL/lib目录以及所有非标头的第三方库(Boost,Flann,VTK)的路径
  • 选择要在链接器中使用的库.在项目属性/配置属性/链接器/输入/其他依赖项中.我添加了所有需要的库.当我暂时尝试以调试模式运行它时,我选择了"_debug.lib"库文件.
  • 最后,我已将PCL/bin文件夹添加到我的系统路径变量中.

有人知道我是否缺少一些配置方面的东西吗?

Does anyone know if I'm missing something configuration-wise?

我看过几篇关于旧点云库和旧版Visual Studio不兼容的文章.据我了解,新版本应该可以很好地协同工作,但对我而言并非如此.

I've seen several old posts about incompatibility between older Point Cloud Libraries and older versions of Visual Studio. As far as I understood, the new versions are supposed to work well together, but it's not the case for me.

推荐答案

安装pcl非常困难,因为与pcl软件一起使用的依赖项很多.但是使用命令行软件包管理器vcpkg时,安装就像一个内衬命令一样.

Installing pcl is tough because there are dozens of dependencies used along with pcl software. But with with vcpkg,a command line package manager, the installation becomes just like a one liner command.

使用Microsoft vcpkg自动为您的项目构建静态或动态库.所有依赖项,例如boost,tiff,openssl,flann,szip等,都将自行下载并安装.安装vcpkg后,在Powershell上键入以下内容.

Use Microsoft vcpkg to build a static or dynamic library for your project automatically. All the dependencies like boost,tiff,openssl,flann,szip,etc will be downloaded and installed by itself. After installing vcpkg type the following on Powershell.

.\vcpkg install pcl:x64-windows-static

这篇关于使用Visual Studio 2017的点云库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-30 02:47