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
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).
first of all, both the PCL and the Visual Studio should be the same version, 32bit / 64bit.
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
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;
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
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)