2

I´ve been trying to run one of the Point Cloud Library examples shown (http://pointclouds.org/documentation/tutorials/using_pcl_pcl_config.php#using-pcl-pcl-config) in the PCL website for the whole morning and still can´t make it run!

This is what I did: I´ve installed Point Cloud library PCL 1.6.0 All-In-One Installer for MSVS 2010 (64 bit) in my computer, then, installed a couple of libraries I found I needed (Boost and Eigen). After, I have added all the dependencies and libraries needed in MS Visual Studio 2010 (PLC, boost and eigen) and I´m still getting these annoying errors:

(I´ve tried also using CMake gui for windows but it reports a lot of errors when generating the project)

1>PCL.obj : error LNK2019: unresolved external symbol "void __cdecl pcl::console::print(enum pcl::console::VERBOSITY_LEVEL,char const *,...)" (?print@console@pcl@@YAXW4VERBOSITY_LEVEL@12@PBDZZ) referenced in function _main

1>PCL.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall pcl::PCDReader::readHeader(class std::basic_string,class std::allocator > const &,struct sensor_msgs::PointCloud2 &,class Eigen::Matrix &,class Eigen::Quaternion &,int &,int &,unsigned int &,int)" (?readHeader@PCDReader@pcl@@UAEHABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAUPointCloud2@sensor_msgs@@AAV?$Matrix@M$03$00$0A@$03$00@Eigen@@AAV?$Quaternion@M$0A@@8@AAH4AAIH@Z)

1>PCL.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall pcl::PCDReader::read(class std::basic_string,class std::allocator > const &,struct sensor_msgs::PointCloud2 &,class Eigen::Matrix &,class Eigen::Quaternion &,int &,int)" (?read@PCDReader@pcl@@UAEHABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAUPointCloud2@sensor_msgs@@AAV?$Matrix@M$03$00$0A@$03$00@Eigen@@AAV?$Quaternion@M$0A@@8@AAHH@Z)

Any, any help would be really appreciated. This thing is taking me so many hours and driving me crazy.

thanks!!

Agustin Meriles
  • 4,866
  • 3
  • 29
  • 44
Nicolai
  • 333
  • 8
  • 15
  • Why did you install Boost and Eigen on top since the all-in-one installer already includes them? – Sassa May 10 '13 at 14:33
  • In that try I just installed PCL (no 3rd party stuff) and then I installed the libraries needed for the example code. I tried also installing the full package PCL + 3rd party and still getting the same errors.... – Nicolai May 10 '13 at 15:23

1 Answers1

2

You have a linker error, so you are missing a lib file or you are not linking against them. Or you are mixing 32bit and 64bit configurations and libs.

Have you done all the steps that I have described in this answer?

I recommend using the all-in-one installer unless you really know how and why PCL needs 3rd party libraries.

Community
  • 1
  • 1
Oszkar
  • 687
  • 1
  • 5
  • 20
  • Thank you!! I was missing to add additional dependencies in the Linker. However, the easiest pcd_write.cpp is working now, but the pcl_visualizer_demo.cpp fails due to failure of VTK unresolved symbols. I have added the paths to the include and the library directories in VC++ Directories. Do I have to add every single .lib VTK file within Linker-Input-Additional Dependencies ?? There are like 100 .lib files in the VTK lib folder! – Nicolai May 27 '13 at 10:15
  • no, technically you only have to add the ones you are using - that being said, sometimes is hard to figure out which ones you need so is easier to add all of them :) (you can rule out the obviously not needed ones e.g. the ones related to databases (sql, mapreduce) or image formats (tiff/jpeg/dicom) and add all of the remaining ones) – Oszkar Jun 02 '13 at 19:49