Setting up Point Cloud Library with Visual Studio
Asked Answered
G

3

17

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.

I want to add the includes and lib location, with the .lib files in the properties of my solution.

I have done this before with opencv, but for PCL I don't know what files and folders I have to add.

Also what .dll files I have to add to the path of the system variables.

Cmake didn't work, and I prefer not to use it.

Griffon answered 13/5, 2013 at 4:13 Comment(1)
If you can't download it from web. you can just try this webFlimsy
P
22
  • 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 (see PCL/3rdParty folder)

  • 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)

  • 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)

  • Add the Be PCL/bin folder to your system path variable (you don't need to add specific dll files, just the folder).

Postiche answered 23/5, 2013 at 13:16 Comment(0)
C
12
  1. first of all, both the PCL and the Visual Studio should be the same version, 32bit / 64bit.

  2. You need to add the following to the Include directories (C/C++ \ general):

C:\Program Files\PCL 1.6.0\3rdParty\VTK\include\vtk-5.8;
C:\Program Files\PCL 1.6.0\3rdParty\Qhull\include;
C:\Program Files\PCL 1.6.0\3rdParty\FLANN\include;
C:\Program Files\PCL 1.6.0\3rdParty\Eigen\include;
C:\Program Files\PCL 1.6.0\3rdParty\Boost\include;
C:\Program Files\PCL 1.6.0\3rdParty;
C:\Program Files\PCL 1.6.0\include\pcl-1.6;
C:\Program Files\OpenNI\Include;
C:\Qt\4.8.0\include
  1. You need to add the following to the library directories (linker/general):
C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8;
C:\Program Files\PCL 1.6.0\3rdParty\Qhull\lib;
C:\Program Files\PCL 1.6.0\3rdParty\FLANN\lib;
C:\Program Files\PCL 1.6.0\3rdParty\Boost\lib;
C:\Program Files\PCL 1.6.0\lib;
C:\Program Files\PCL 1.6.0\lib\$(Configuration);
C:\Qt\4.8.0\lib;
C:\Program Files\OpenNI\lib;
  1. Also you need to add the following objects (linker/input):
openNI.lib
libboost_system-vc100-mt-gd-1_49.lib
libboost_filesystem-vc100-mt-gd-1_49.lib
libboost_thread-vc100-mt-gd-1_49.lib
libboost_date_time-vc100-mt-gd-1_49.lib
libboost_iostreams-vc100-mt-gd-1_49.lib
pcl_common_debug.lib
pcl_apps_debug.lib
pcl_features_debug.lib
pcl_filters_debug.lib
pcl_io_debug.lib
pcl_io_ply_debug.lib
pcl_kdtree_debug.lib
pcl_keypoints_debug.lib
pcl_octree_debug.lib
pcl_registration_debug.lib
pcl_sample_consensus_debug.lib
pcl_search_debug.lib
pcl_segmentation_debug.lib
pcl_surface_debug.lib
pcl_tracking_debug.lib
pcl_visualization_debug.lib
vtkRendering-gd.lib
QVTK-gd.lib
vtkalglib-gd.lib
vtkCharts-gd.lib
vtkCommon-gd.lib
vtkDICOMParser-gd.lib
vtkexoIIc-gd.lib
vtkexpat-gd.lib
vtkFiltering-gd.lib
vtkfreetype-gd.lib
vtkftgl-gd.lib
vtkGenericFiltering-gd.lib
vtkGeovis-gd.lib
vtkGraphics-gd.lib
vtkhdf5-gd.lib
vtkHybrid-gd.lib
vtkImaging-gd.lib
vtkInfovis-gd.lib
vtkIO-gd.lib
vtkjpeg-gd.lib
vtklibxml2-gd.lib
vtkmetaio-gd.lib
vtkNetCDF_cxx-gd.lib
vtkNetCDF-gd.lib
vtkpng-gd.lib
vtkproj4-gd.lib
vtksqlite-gd.lib
vtksys-gd.lib
vtktiff-gd.lib
vtkverdict-gd.lib
vtkViews-gd.lib
vtkVolumeRendering-gd.lib
vtkWidgets-gd.lib
vtkzlib-gd.lib
OpenGL32.Lib
  • If you use Visual Studio 2012 or 2013 you cannot use PCL libraries.
Carpel answered 30/12, 2013 at 10:27 Comment(3)
"If you use Visual Studio 2012 or 2013 you cannot use PCL libraries." Great, just wasted half a day trying to get this to work in VS2013.Sanbo
You can use more recent Visual Studio with PCL libraries. But then you can have to use the libraries provided at this link [unanancyowen.com/en/pcl18/] {Look for these lines : 2017/07/18 PCL 1.8.1 RC2 has been released. You can download installer from official release page.} instead from the pointclouds.org website.Roanne
I created everything as mentioned and it builds 32bit version without any problems (referenced folders are in C:\Program Files (x86)...). But when I try 64bit build it results in errors although I've set everything as for 32bit (only difference is folder: C:\Program Files...). Is there anything else that should be set? I have installed All in one installer for both, 32 and 64 bit.Cartridge
M
6

Of course you can use PCL in VS2013/VS2012.

I use PCL and OpenCV in VS2012.

Becasue compile PCL from source is not easy, but the PCL version1.6.0 for"All-in-one installers (PCL + dependencies)" is a little old(only for VS2008, VS2010). Here's is the newest PCL1.7.2 for VS2013"All-in-one installers (PCL + dependencies)" download(password:706c)

Midsummer answered 26/4, 2015 at 6:7 Comment(4)
I have an example project(use all-in-one PCL1.7.2 and OpenCV2.4.9) in VS2012 download. You can open the project and change a few place in the project property to you PCL path and OpenCV path. Also you can open it in VS2013. If you don't need opencv, just remove it from project property. I hope this will help you.Midsummer
Thanks for this effort gouchaoer, I'll check this out. By the way the second download is just an example. Does it build against the all-in-one for 2013? Also I would be interested in finding out how to build it form scratch. We have it building more or less successfully, but some parts fail to link correctly to the example source code on the pcl website.Kelila
Yes, firstly install the PCL1.7.2 for VS2013"All-in-one installers (PCL + dependencies)". secondly open the example project and change some setting in your vs project property to the PCL library. Then you can use PCL1.7.2 in VS2013/VS2012. I try to build PCL1.7.2 from scratch but failed, but someone build it successfully.Midsummer
pcl 1.8 working download links : unanancyowen.com/pcl18 for visual studio 13/15Strohbehn

© 2022 - 2024 — McMap. All rights reserved.