Tôi đã cài đặt tất cả các phụ thuộc và thư viện PCL đã biên dịch trước như được đề xuất trên site.Tạo dự án với PCL (Thư viện đám mây điểm) trên Mac OS X
Sau khi tôi đã cài đặt mọi thứ tôi muốn tạo một dự án theo hướng dẫn this.
Sau khi thực hiện 'make' lệnh tôi nhận được nhiều cảnh báo và hai lỗi sau đây:
37 warnings generated.
Linking CXX executable pcd_write_test
Undefined symbols for architecture x86_64:
"pcl::PCDWriter::writeASCII(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, sensor_msgs::PointCloud2 const&, Eigen::Matrix<float, 4, 1, 0, 4, 1> const&, Eigen::Quaternion<float, 0> const&, int)", referenced from:
pcl::PCDWriter::write(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, sensor_msgs::PointCloud2 const&, Eigen::Matrix<float, 4, 1, 0, 4, 1> const&, Eigen::Quaternion<float, 0> const&, bool) in pcd_write.cpp.o
"pcl::PCDWriter::writeBinary(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, sensor_msgs::PointCloud2 const&, Eigen::Matrix<float, 4, 1, 0, 4, 1> const&, Eigen::Quaternion<float, 0> const&)", referenced from:
pcl::PCDWriter::write(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, sensor_msgs::PointCloud2 const&, Eigen::Matrix<float, 4, 1, 0, 4, 1> const&, Eigen::Quaternion<float, 0> const&, bool) in pcd_write.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [pcd_write_test] Error 1
make[1]: *** [CMakeFiles/pcd_write_test.dir/all] Error 2
make: *** [all] Error 2
Bất kỳ ai có bất cứ đề nghị làm thế nào để sửa lỗi này?
Tôi đang sử dụng Mac OS X 10.9.4.
Tôi tìm thấy giải pháp trong [thread] [1] này. [1]: http://stackoverflow.com/questions/16318961/how-do-i-link-pcl-library-properly-for-use-within-an-objective-c-app-compiled-in – Silex
Bạn có tìm thấy giải pháp cuối cùng không? Tôi có chung vấn đề đó. – JessMcintosh
Có, tôi đã tìm thấy giải pháp trong liên kết ở trên (nhận xét đầu tiên). – Silex