Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting up Point Cloud Library with Visual Studio

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.

like image 890
Jose Bravo Avatar asked May 13 '13 04:05

Jose Bravo


2 Answers

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

like image 137
Oszkar Avatar answered Oct 18 '22 06:10

Oszkar


  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.
like image 12
NKN Avatar answered Oct 18 '22 07:10

NKN