I´m trying to use the Open Point Cloud library for aligning point-clouds. I use Visual Studio 2012 and created a new Visual c++ project. The Directory where all the .libs of PCL are stored is added in the properties of the project (Properties -> c/c++ -> general-> additional include directory) The libs i want to use are listed in Properties -> linker -> Input -> additional dependencies
The Code i Have written till now is very simple:
#include <iostream>
#include <pcl/io/pcd_io.h>
#include <pcl/point_types.h>
#include <pcl/point_cloud.h>
int main(int argc, char** argv)
{
//creates a PointCloud<PointXYZ> boost shared pointer and initializes it
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_src (new pcl::PointCloud<pcl::PointXYZ>);
//load Pointsclouds from PCD-Files
pcl::io::loadPCDFile<pcl::PointXYZ> ("pcd_ascii.pcd", *cloud_src); // <- at this point the error occurs
}
I just followed this tutorial: http://pointclouds.org/documentation/tutorials/reading_pcd.php
I includet the right libs and files…especially “pcd_io.h”, why do I get the linker-error? The pcd-file which I want to load is located in the same folder as the cpp-file. Do I handle the libs in a wrong way?
The Link-Errors Fehler 28 error LNK2020: Nicht aufgel÷stes Token (0A000C90) "void __cdecl pcl::console::print(enum pcl::console::VERBOSITY_LEVEL,char const *,...)" (?print@console@pcl@@$$FYAXW4VERBOSITY_LEVEL@12@PBDZZ). D:\Documents\ \Code\PCL_cpp\pcl_cpp\pcl_cpp\pcl_registration.obj pcl_cpp
Fehler 29 error LNK2020: Nicht aufgel÷stes Token (0A000CBD) "void __cdecl pcl::console::print(enum pcl::console::VERBOSITY_LEVEL,char const *,...)" (?print@console@pcl@@$$FYAXW4VERBOSITY_LEVEL@12@PBDZZ). D:\Documents\ Code\PCL_cpp\pcl_cpp\pcl_cpp\pcl_registration.obj pcl_cpp
Fehler 30 error LNK2001: Nicht aufgel÷stes externes 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)". D:\Documents\ Code\PCL_cpp\pcl_cpp\pcl_cpp\pcl_registration.obj pcl_cpp
Fehler 31 error LNK2001: Nicht aufgel÷stes externes 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)". D:\Documents\ Code\PCL_cpp\pcl_cpp\pcl_cpp\pcl_registration.obj pcl_cpp
Fehler 32 error LNK2001: Nicht aufgel÷stes externes Symbol ""void __cdecl pcl::console::print(enum pcl::console::VERBOSITY_LEVEL,char const *,...)" (?print@console@pcl@@$$FYAXW4VERBOSITY_LEVEL@12@PBDZZ)". D:\Documents\Code\PCL_cpp\pcl_cpp\pcl_cpp\pcl_registration.obj pcl_cpp
The Errors are in german "Nicht aufgelöstes" means unresolved On your coment regarding the right installation... i wasn´t shure, so i downloaded and installed it again. its the full-installer for 64bit "Windows MSVC 2010 (64bit)" After the Installation i get the same results.