问题描述
我正在尝试将点云库与Visual Studio一起使用.我下载了多合一64位安装程序Visual Studio 10并安装了它们.但是现在我无法在Visual Studio 2010上运行它,但是我在运气不好的情况下尝试了官方页面上的教程.
I am trying to use the Point Cloud Library with Visual Studio. I downloaded the all-in-one 64 bit installer, Visual Studio 10 and installed them. But now I cannot run it on Visual Studio 2010, I have tried the tutorial on the official page with no luck.
我想添加include和lib位置,并在解决方案的属性中添加.lib文件.
I want to add the includes and lib location, with the .lib files in the properties of my solution.
我之前已经使用opencv完成了此操作,但是对于PCL,我不知道必须添加哪些文件和文件夹.
I have done this before with opencv, but for PCL I don't know what files and folders I have to add.
我还必须在系统变量的路径中添加哪些.dll文件.
Also what .dll files I have to add to the path of the system variables.
Cmake无效,我更喜欢不使用它.
Cmake didn't work, and I prefer not to use it.
推荐答案
-
您必须在项目属性/配置属性/VC ++目录/包含目录字段中将包含目录添加到项目中-在这里您指定
PCL/include
目录的路径,并所有第3方的包含目录(请参见PCL/3rdParty
文件夹)You have to add the include directories to your project at the Project Properties / Configuration Properties / VC++ Directories / Include Directories field - here you specify the path to your
PCL/include
directory and to all 3rd party include directories (seePCL/3rdParty
folder)您必须在相同的设置页面( Library Directories 字段)上添加库目录-在这里您指定
PCL/lib
目录以及所有非仅标头的路径第三方库(即Boost,Flann,VTK)You have to add the library directories on the same settings page (Library Directories field) - here you specify the path to your
PCL/lib
directory and to all non-header-only 3rd party libs (namely Boost, Flann, VTK)您必须告诉链接器,您将使用哪个库.可以在项目属性/配置属性/链接器/输入/其他依赖项字段中完成.添加您正在使用的所有库.如果您使用的不是基本功能,则很可能需要
pcl_common
,pcl_io
,pcl_visualization
和其他一些功能.请注意,将_release
库添加到发布配置中,并将_debug
库添加到调试配置中(在您的情况下,它应该是64位配置).You have to tell the linker, which libs you will use. This can be done on Project Properties / Configuration Properties / Linker / Input / Additional Dependencies field. Add all the libs you are using. Most likely, you will need
pcl_common
,pcl_io
,pcl_visualization
and some others if you are using any functionalities other than the basics. Be aware to add the_release
libs to your release configuration and_debug
libs to your debug configuration (which should be a 64bit configuration in your case).如果您打算同时使用两种配置(调试"和发布"),请执行两次以上操作
Do the above twice, if you plan to use both configurations (Debug and Release)
将Be
PCL/bin
文件夹添加到系统路径变量(您无需添加特定的dll文件,只需添加该文件夹).Add the Be
PCL/bin
folder to your system path variable (you don't need to add specific dll files, just the folder).这篇关于使用Visual Studio设置点云库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!