Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

catkin_make Image Projection Error with CommonLib #15

Open
tigeriv opened this issue May 5, 2023 · 1 comment
Open

catkin_make Image Projection Error with CommonLib #15

tigeriv opened this issue May 5, 2023 · 1 comment

Comments

@tigeriv
Copy link

tigeriv commented May 5, 2023

Hi, thank you for sharing your code. I am currently trying to run it on ROS Noetic, Ubuntu 20.04 however am unable to fix an error during the catkin_make step. I followed the installation instructions and am able to build LIO-SAM successfully, so I am unsure why I am receiving a build error. Below is the output from catkin_make, which seems to indicate the header file common_lib.h is not being referenced correctly in ImageProjection. Please let me know if you have advice on how to fix this error.

/usr/bin/ld: CMakeFiles/liorf_imageProjection.dir/src/imageProjection.cpp.o: in function void __gnu_cxx::new_allocator<CommonLib::common_lib>::destroy<CommonLib::common_lib>(CommonLib::common_lib*)': /usr/include/c++/9/ext/new_allocator.h:152: undefined reference to CommonLib::common_lib::~common_lib()'
/usr/bin/ld: CMakeFiles/liorf_imageProjection.dir/src/imageProjection.cpp.o: in function void __gnu_cxx::new_allocator<CommonLib::common_lib>::construct<CommonLib::common_lib, char const (&) [8]>(CommonLib::common_lib*, char const (&) [8])': /usr/include/c++/9/ext/new_allocator.h:146: undefined reference to CommonLib::common_lib::common_lib(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/usr/bin/ld: CMakeFiles/liorf_imageProjection.dir/src/imageProjection.cpp.o: in function ImageProjection::projectPointCloud()': /home/tigeriv/Code/catkin_ws/src/liorf/src/imageProjection.cpp:580: undefined reference to float CommonLib::common_lib::pointDistancepcl::PointXYZI(pcl::PointXYZI const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [liorf/CMakeFiles/liorf_imageProjection.dir/build.make:455: /home/tigeriv/Code/catkin_ws/devel/lib/liorf/liorf_imageProjection] Error 1
make[1]: *** [CMakeFiles/Makefile2:9942: liorf/CMakeFiles/liorf_imageProjection.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/usr/bin/ld: CMakeFiles/liorf_mapOptmization.dir/src/mapOptmization.cpp.o: in function mapOptimization::addGPSFactor()': /home/tigeriv/Code/catkin_ws/src/liorf/src/mapOptmization.cpp:1412: undefined reference to float CommonLib::common_lib::pointDistancepcl::PointXYZI(pcl::PointXYZI const&, pcl::PointXYZI const&)'
/usr/bin/ld: /home/tigeriv/Code/catkin_ws/src/liorf/src/mapOptmization.cpp:1465: undefined reference to float CommonLib::common_lib::pointDistance<pcl::PointXYZI>(pcl::PointXYZI const&, pcl::PointXYZI const&)' /usr/bin/ld: CMakeFiles/liorf_mapOptmization.dir/src/mapOptmization.cpp.o: in function mapOptimization::publishGlobalMap()':
/home/tigeriv/Code/catkin_ws/src/liorf/src/mapOptmization.cpp:491: undefined reference to float CommonLib::common_lib::pointDistance<pcl::PointXYZI>(pcl::PointXYZI const&, pcl::PointXYZI const&)' /usr/bin/ld: CMakeFiles/liorf_mapOptmization.dir/src/mapOptmization.cpp.o: in function mapOptimization::extractCloud(boost::shared_ptr<pcl::PointCloudpcl::PointXYZI >)':
/home/tigeriv/Code/catkin_ws/src/liorf/src/mapOptmization.cpp:1018: undefined reference to `float CommonLib::common_lib::pointDistancepcl::PointXYZI(pcl::PointXYZI const&, pcl::PointXYZI const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [liorf/CMakeFiles/liorf_mapOptmization.dir/build.make:484: /home/tigeriv/Code/catkin_ws/devel/lib/liorf/liorf_mapOptmization] Error 1
make[1]: *** [CMakeFiles/Makefile2:10303: liorf/CMakeFiles/liorf_mapOptmization.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

@YJZLuckyBoy
Copy link
Owner

Thank you for your attention to this work. I have not tested liorf on Ubuntu 20.04, and some template functions have been defined in 'common_lib.cpp'. The detailed function implementation can be viewed from common_lib.cpp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants