MasteringOpenCV/code

CH4 almost there, but the linking failed at 100%

fabiopoiesi opened this issue · 0 comments

I'm almost there to compile everything. Quite painful. I arrived at the end and I have the linking problem here below. Has anyone encountered this? Is it because PCL was compiled with c++11 and the std libs are compiled with a previous version?

[100%] Linking CXX executable ExploringSfMExec
CMakeFiles/ExploringSfMExec.dir/Visualization.cpp.o: In function RunVisualizationOnly()': Visualization.cpp:(.text+0x1a37): undefined reference to pcl::visualization::PCLVisualizer::PCLVisualizer(std::string const&, bool)'
Visualization.cpp:(.text+0x1b34): undefined reference to pcl::visualization::PCLVisualizer::removePointCloud(std::string const&, int)' Visualization.cpp:(.text+0x1c14): undefined reference to pcl::visualization::PCLVisualizer::removePointCloud(std::string const&, int)'
Visualization.cpp:(.text+0x1d4a): undefined reference to pcl::visualization::PCLVisualizer::removePointCloud(std::string const&, int)' Visualization.cpp:(.text+0x1eba): undefined reference to pcl::visualization::PCLVisualizer::removeShape(std::string const&, int)'
Visualization.cpp:(.text+0x1ef6): undefined reference to pcl::visualization::PCLVisualizer::addPolygonMesh(pcl::PolygonMesh const&, std::string const&, int)' Visualization.cpp:(.text+0x21df): undefined reference to pcl::visualization::PCLVisualizer::removeShape(std::string const&, int)'
CMakeFiles/ExploringSfMExec.dir/Visualization.cpp.o: In function pcl::PCDWriter::write(std::string const&, pcl::PCLPointCloud2 const&, Eigen::Matrix<float, 4, 1, 0, 4, 1> const&, Eigen::Quaternion<float, 0> const&, bool)': Visualization.cpp:(.text._ZN3pcl9PCDWriter5writeERKSsRKNS_14PCLPointCloud2ERKN5Eigen6MatrixIfLi4ELi1ELi0ELi4ELi1EEERKNS6_10QuaternionIfLi0EEEb[_ZN3pcl9PCDWriter5writeERKSsRKNS_14PCLPointCloud2ERKN5Eigen6MatrixIfLi4ELi1ELi0ELi4ELi1EEERKNS6_10QuaternionIfLi0EEEb]+0x43): undefined reference to pcl::PCDWriter::writeBinary(std::string const&, pcl::PCLPointCloud2 const&, Eigen::Matrix<float, 4, 1, 0, 4, 1> const&, Eigen::Quaternion<float, 0> const&)'
Visualization.cpp:(.text._ZN3pcl9PCDWriter5writeERKSsRKNS_14PCLPointCloud2ERKN5Eigen6MatrixIfLi4ELi1ELi0ELi4ELi1EEERKNS6_10QuaternionIfLi0EEEb[_ZN3pcl9PCDWriter5writeERKSsRKNS_14PCLPointCloud2ERKN5Eigen6MatrixIfLi4ELi1ELi0ELi4ELi1EEERKNS6_10QuaternionIfLi0EEEb]+0x6a): undefined reference to pcl::PCDWriter::writeASCII(std::string const&, pcl::PCLPointCloud2 const&, Eigen::Matrix<float, 4, 1, 0, 4, 1> const&, Eigen::Quaternion<float, 0> const&, int)' CMakeFiles/ExploringSfMExec.dir/Visualization.cpp.o: In function int pcl::PCDWriter::writeBinarypcl::PointXYZRGB(std::string const&, pcl::PointCloudpcl::PointXYZRGB const&)':
Visualization.cpp:(.text._ZN3pcl9PCDWriter11writeBinaryINS_11PointXYZRGBEEEiRKSsRKNS_10PointCloudIT_EE[_ZN3pcl9PCDWriter11writeBinaryINS_11PointXYZRGBEEEiRKSsRKNS_10PointCloudIT_EE]+0x28d): undefined reference to pcl::PCDWriter::setLockingPermissions(std::string const&, boost::interprocess::file_lock&)' Visualization.cpp:(.text._ZN3pcl9PCDWriter11writeBinaryINS_11PointXYZRGBEEEiRKSsRKNS_10PointCloudIT_EE[_ZN3pcl9PCDWriter11writeBinaryINS_11PointXYZRGBEEEiRKSsRKNS_10PointCloudIT_EE]+0x4dd): undefined reference to pcl::PCDWriter::resetLockingPermissions(std::string const&, boost::interprocess::file_lock&)'
Visualization.cpp:(.text._ZN3pcl9PCDWriter11writeBinaryINS_11PointXYZRGBEEEiRKSsRKNS_10PointCloudIT_EE[_ZN3pcl9PCDWriter11writeBinaryINS_11PointXYZRGBEEEiRKSsRKNS_10PointCloudIT_EE]+0x602): undefined reference to pcl::PCDWriter::resetLockingPermissions(std::string const&, boost::interprocess::file_lock&)' Visualization.cpp:(.text._ZN3pcl9PCDWriter11writeBinaryINS_11PointXYZRGBEEEiRKSsRKNS_10PointCloudIT_EE[_ZN3pcl9PCDWriter11writeBinaryINS_11PointXYZRGBEEEiRKSsRKNS_10PointCloudIT_EE]+0x712): undefined reference to pcl::PCDWriter::resetLockingPermissions(std::string const&, boost::interprocess::file_lock&)'
Visualization.cpp:(.text._ZN3pcl9PCDWriter11writeBinaryINS_11PointXYZRGBEEEiRKSsRKNS_10PointCloudIT_EE[_ZN3pcl9PCDWriter11writeBinaryINS_11PointXYZRGBEEEiRKSsRKNS_10PointCloudIT_EE]+0x9d9): undefined reference to pcl::PCDWriter::resetLockingPermissions(std::string const&, boost::interprocess::file_lock&)' Visualization.cpp:(.text._ZN3pcl9PCDWriter11writeBinaryINS_11PointXYZRGBEEEiRKSsRKNS_10PointCloudIT_EE[_ZN3pcl9PCDWriter11writeBinaryINS_11PointXYZRGBEEEiRKSsRKNS_10PointCloudIT_EE]+0xa9b): undefined reference to pcl::PCDWriter::resetLockingPermissions(std::string const&, boost::interprocess::file_lock&)'
CMakeFiles/ExploringSfMExec.dir/Visualization.cpp.o: In function int pcl::PCDWriter::writeASCII<pcl::PointXYZRGB>(std::string const&, pcl::PointCloud<pcl::PointXYZRGB> const&, int)': Visualization.cpp:(.text._ZN3pcl9PCDWriter10writeASCIIINS_11PointXYZRGBEEEiRKSsRKNS_10PointCloudIT_EEi[_ZN3pcl9PCDWriter10writeASCIIINS_11PointXYZRGBEEEiRKSsRKNS_10PointCloudIT_EEi]+0x2fc): undefined reference to pcl::PCDWriter::setLockingPermissions(std::string const&, boost::interprocess::file_lock&)'
Visualization.cpp:(.text._ZN3pcl9PCDWriter10writeASCIIINS_11PointXYZRGBEEEiRKSsRKNS_10PointCloudIT_EEi[_ZN3pcl9PCDWriter10writeASCIIINS_11PointXYZRGBEEEiRKSsRKNS_10PointCloudIT_EEi]+0xcef): undefined reference to `pcl::PCDWriter::resetLockingPermissions(std::string const&, boost::interprocess::file_lock&)'
collect2: error: ld returned 1 exit status
CMakeFiles/ExploringSfMExec.dir/build.make:417: recipe for target 'ExploringSfMExec' failed
make[2]: *** [ExploringSfMExec] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/ExploringSfMExec.dir/all' failed
make[1]: *** [CMakeFiles/ExploringSfMExec.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2