MasteringOpenCV / code

Code for the book "Mastering OpenCV with Practical Computer Vision Projects" by Packt Publishing 2012.
Other
2.71k stars 1.64k forks source link

CH4 almost there, but the linking failed at 100% #89

Open fabiopoiesi opened 6 years ago

fabiopoiesi commented 6 years ago

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 topcl::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 topcl::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 topcl::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 topcl::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 topcl::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 functionint pcl::PCDWriter::writeBinary(std::string const&, pcl::PointCloud 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 topcl::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 topcl::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 topcl::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 topcl::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