makefile链接时出现undefined reference to `std::...

本文探讨了使用GCC编译C++代码时遇到的问题,包括编译与链接错误,并提出了两种解决方案:一是将编译命令从GCC改为G++;二是尝试在GCC命令后加入-lstdc++选项。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Solutions:

(1)change gcc to g++;

(2)add "-lstdc++" after "gcc". [这一条没有试验成功]

#来源:http://blog.sina.com.cn/s/blog_698f90230100xwwc.html


后缀为.c的文件用gcc编译会出现iostream: No such file or directory. 链接时gcc也不行,必须全部写成g++。

后缀为.cpp的文件可以用gcc编译,但链接时必须用g++。

[ 78%] Linking CXX executable ../Examples/Monocular/mono_tum [ 80%] Linking CXX executable ../Examples/Monocular-Inertial/mono_inertial_euroc /usr/bin/ld: CMakeFiles/mono_tum_old.dir/Examples_old/Monocular/mono_tum.cc.o: in function `main': mono_tum.cc:(.text.startup+0x451): undefined reference to `cv::imread(std::string const&, int)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `boost::archive::basic_binary_iprimitive<boost::archive::binary_iarchive, char, std::char_traits<char> >::load(std::string&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `pangolin::Split(std::string const&, char)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `boost::archive::text_oarchive_impl<boost::archive::text_oarchive>::save(std::string const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::putText(cv::_InputOutputArray const&, std::string const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::imshow(std::string const&, cv::_InputArray const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::getTextSize(std::string const&, int, double, int, int*)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::FileStorage::FileStorage(std::string const&, int, std::string const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::namedWindow(std::string const&, int)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::FileNode::string() const' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::FileStorage::operator[](std::string const&) const' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::error(int, std::string const&, char const*, char const*, int)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `DBoW2::FORB::toString(cv::Mat const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `pangolin::CreateWindowAndBind(std::string, int, int, pangolin::Params const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::write(cv::FileStorage&, std::string const&, int)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `boost::archive::basic_binary_oprimitive<boost::archive::binary_oarchive, char, std::char_traits<char> >::save(std::string const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `DBoW2::FORB::fromString(cv::Mat&, std::string const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `pangolin::CreatePanel(std::string const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::operator<<(cv::FileStorage&, std::string const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::write(cv::FileStorage&, std::string const&, double)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `boost::archive::text_iarchive_impl<boost::archive::text_iarchive>::load(std::string&)' collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/mono_tum_old.dir/build.make:132:../Examples_old/Monocular/mono_tum_old] 错误 1 make[1]: *** [CMakeFiles/Makefile2:201:CMakeFiles/mono_tum_old.dir/all] 错误 2 make[1]: *** 正在等待未完成的任务.... /usr/bin/ld: CMakeFiles/mono_tum.dir/Examples/Monocular/mono_tum.cc.o: in function `main': mono_tum.cc:(.text.startup+0x451): undefined reference to `cv::imread(std::string const&, int)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `boost::archive::basic_binary_iprimitive<boost::archive::binary_iarchive, char, std::char_traits<char> >::load(std::string&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `pangolin::Split(std::string const&, char)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `boost::archive::text_oarchive_impl<boost::archive::text_oarchive>::save(std::string const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::putText(cv::_InputOutputArray const&, std::string const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::imshow(std::string const&, cv::_InputArray const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::getTextSize(std::string const&, int, double, int, int*)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::FileStorage::FileStorage(std::string const&, int, std::string const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::namedWindow(std::string const&, int)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::FileNode::string() const' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::FileStorage::operator[](std::string const&) const' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::error(int, std::string const&, char const*, char const*, int)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `DBoW2::FORB::toString(cv::Mat const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `pangolin::CreateWindowAndBind(std::string, int, int, pangolin::Params const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::write(cv::FileStorage&, std::string const&, int)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `boost::archive::basic_binary_oprimitive<boost::archive::binary_oarchive, char, std::char_traits<char> >::save(std::string const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `DBoW2::FORB::fromString(cv::Mat&, std::string const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `pangolin::CreatePanel(std::string const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::operator<<(cv::FileStorage&, std::string const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::write(cv::FileStorage&, std::string const&, double)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `boost::archive::text_iarchive_impl<boost::archive::text_iarchive>::load(std::string&)' collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/mono_tum.dir/build.make:132:../Examples/Monocular/mono_tum] 错误 1 make[1]: *** [CMakeFiles/Makefile2:174:CMakeFiles/mono_tum.dir/all] 错误 2 /usr/bin/ld: CMakeFiles/mono_inertial_euroc.dir/Examples/Monocular-Inertial/mono_inertial_euroc.cc.o: in function `main': mono_inertial_euroc.cc:(.text.startup+0xa8b): undefined reference to `cv::imread(std::string const&, int)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `boost::archive::basic_binary_iprimitive<boost::archive::binary_iarchive, char, std::char_traits<char> >::load(std::string&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `pangolin::Split(std::string const&, char)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `boost::archive::text_oarchive_impl<boost::archive::text_oarchive>::save(std::string const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::putText(cv::_InputOutputArray const&, std::string const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::imshow(std::string const&, cv::_InputArray const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::getTextSize(std::string const&, int, double, int, int*)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::FileStorage::FileStorage(std::string const&, int, std::string const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::namedWindow(std::string const&, int)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::FileNode::string() const' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::FileStorage::operator[](std::string const&) const' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::error(int, std::string const&, char const*, char const*, int)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `DBoW2::FORB::toString(cv::Mat const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `pangolin::CreateWindowAndBind(std::string, int, int, pangolin::Params const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::write(cv::FileStorage&, std::string const&, int)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `boost::archive::basic_binary_oprimitive<boost::archive::binary_oarchive, char, std::char_traits<char> >::save(std::string const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `DBoW2::FORB::fromString(cv::Mat&, std::string const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `pangolin::CreatePanel(std::string const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::operator<<(cv::FileStorage&, std::string const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::write(cv::FileStorage&, std::string const&, double)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `boost::archive::text_iarchive_impl<boost::archive::text_iarchive>::load(std::string&)' collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/mono_inertial_euroc.dir/build.make:132:../Examples/Monocular-Inertial/mono_inertial_euroc] 错误 1 make[1]: *** [CMakeFiles/Makefile2:147:CMakeFiles/mono_inertial_euroc.dir/all] 错误 2 [ 81%] Linking CXX executable ../Examples_old/Monocular-Inertial/mono_inertial_tum_vi_old /usr/bin/ld: CMakeFiles/mono_inertial_tum_vi_old.dir/Examples_old/Monocular-Inertial/mono_inertial_tum_vi.cc.o: in function `main': mono_inertial_tum_vi.cc:(.text.startup+0x890): undefined reference to `cv::imread(std::string const&, int)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `boost::archive::basic_binary_iprimitive<boost::archive::binary_iarchive, char, std::char_traits<char> >::load(std::string&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `pangolin::Split(std::string const&, char)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `boost::archive::text_oarchive_impl<boost::archive::text_oarchive>::save(std::string const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::putText(cv::_InputOutputArray const&, std::string const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::imshow(std::string const&, cv::_InputArray const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::getTextSize(std::string const&, int, double, int, int*)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::FileStorage::FileStorage(std::string const&, int, std::string const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::namedWindow(std::string const&, int)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::FileNode::string() const' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::FileStorage::operator[](std::string const&) const' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::error(int, std::string const&, char const*, char const*, int)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `DBoW2::FORB::toString(cv::Mat const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `pangolin::CreateWindowAndBind(std::string, int, int, pangolin::Params const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::write(cv::FileStorage&, std::string const&, int)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `boost::archive::basic_binary_oprimitive<boost::archive::binary_oarchive, char, std::char_traits<char> >::save(std::string const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `DBoW2::FORB::fromString(cv::Mat&, std::string const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `pangolin::CreatePanel(std::string const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::operator<<(cv::FileStorage&, std::string const&)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `cv::write(cv::FileStorage&, std::string const&, double)' /usr/bin/ld: ../lib/libORB_SLAM3.so: undefined reference to `boost::archive::text_iarchive_impl<boost::archive::text_iarchive>::load(std::string&)' collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/mono_inertial_tum_vi_old.dir/build.make:132:../Examples_old/Monocular-Inertial/mono_inertial_tum_vi_old] 错误 1 make[1]: *** [CMakeFiles/Makefile2:120:CMakeFiles/mono_inertial_tum_vi_old.dir/all] 错误 2 make: *** [Makefile:84:all] 错误 2
06-14
../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::parent_path() const' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::directory_iterator::operator*() const' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::has_parent_path() const' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::_M_find_extension() const' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::symlink_status(std::filesystem::__cxx11::path const&)' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::has_root_directory() const' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::directory_iterator::operator++()' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::directory_iterator::directory_iterator(std::filesystem::__cxx11::path const&, std::filesystem::directory_options, std::error_code*)' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::read_symlink(std::filesystem::__cxx11::path const&)' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::replace_extension(std::filesystem::__cxx11::path const&)' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::has_filename() const' collect2: error: ld returned 1 exit status g2o/apps/g2o_cli/CMakeFiles/g2o_cli_application.dir/build.make:99: recipe for target 'bin/g2o' failed make[2]: *** [bin/g2o] Error 1 CMakeFiles/Makefile2:1230: recipe for target 'g2o/apps/g2o_cli/CMakeFiles/g2o_cli_application.dir/all' failed make[1]: *** [g2o/apps/g2o_cli/CMakeFiles/g2o_cli_application.dir/all] Error 2 Makefile:155: recipe for target 'all' failed make: *** [all] Error 2
08-07
编译g2o,输入make后../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::parent_path() const' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::directory_iterator::operator*() const' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::has_parent_path() const' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::_M_find_extension() const' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::symlink_status(std::filesystem::__cxx11::path const&)' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::has_root_directory() const' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::directory_iterator::operator++()' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::directory_iterator::directory_iterator(std::filesystem::__cxx11::path const&, std::filesystem::directory_options, std::error_code*)' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::read_symlink(std::filesystem::__cxx11::path const&)' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::replace_extension(std::filesystem::__cxx11::path const&)' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::has_filename() const' collect2: error: ld returned 1 exit status g2o/examples/data_fitting/CMakeFiles/curve_fit.dir/build.make:99: recipe for target 'bin/curve_fit' failed make[2]: *** [bin/curve_fit] Error 1 CMakeFiles/Makefile2:1924: recipe for target 'g2o/examples/data_fitting/CMakeFiles/curve_fit.dir/all' failed make[1]: *** [g2o/examples/data_fitting/CMakeFiles/curve_fit.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs....../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::parent_path() const' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::directory_iterator::operator*() const' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::has_parent_path() const' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::_M_find_extension() const' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::symlink_status(std::filesystem::__cxx11::path const&)' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::has_root_directory() const' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::directory_iterator::operator++()' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::directory_iterator::directory_iterator(std::filesystem::__cxx11::path const&, std::filesystem::directory_options, std::error_code*)' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::read_symlink(std::filesystem::__cxx11::path const&)' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::replace_extension(std::filesystem::__cxx11::path const&)' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::has_filename() const' collect2: error: ld returned 1 exit status g2o/examples/data_fitting/CMakeFiles/circle_fit.dir/build.make:99: recipe for target 'bin/circle_fit' failed make[2]: *** [bin/circle_fit] Error 1 CMakeFiles/Makefile2:1896: recipe for target 'g2o/examples/data_fitting/CMakeFiles/circle_fit.dir/all' failed make[1]: *** [g2o/examples/data_fitting/CMakeFiles/circle_fit.dir/all] Error 2Makefile:155: recipe for target 'all' failed make: *** [all] Error 2
最新发布
08-07
编译安装g2o,cmake .. make之后../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::parent_path() const' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::directory_iterator::operator*() const' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::has_parent_path() const' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::_M_find_extension() const' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::symlink_status(std::filesystem::__cxx11::path const&)' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::has_root_directory() const' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::directory_iterator::operator++()' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::directory_iterator::directory_iterator(std::filesystem::__cxx11::path const&, std::filesystem::directory_options, std::error_code*)' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::read_symlink(std::filesystem::__cxx11::path const&)' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::replace_extension(std::filesystem::__cxx11::path const&)' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::has_filename() const' collect2: error: ld returned 1 exit status g2o/apps/g2o_cli/CMakeFiles/g2o_cli_application.dir/build.make:99: recipe for target 'bin/g2o' failed make[2]: *** [bin/g2o] Error 1 CMakeFiles/Makefile2:1230: recipe for target 'g2o/apps/g2o_cli/CMakeFiles/g2o_cli_application.dir/all' failed make[1]: *** [g2o/apps/g2o_cli/CMakeFiles/g2o_cli_application.dir/all] Error 2 Makefile:155: recipe for target 'all' failed make: *** [all] Error 2
08-07
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值