对‘google::LogMessage::stream()’未定义的引用

Ubuntu系统下使用ceres库,make提示如下错误

CMakeFiles/pose_estimation_3d2d.dir/pose_estimation_3d2d.cpp.o:在函数‘ceres::internal::FixedArray<double, 6ul, std::allocator<double> >::operator[](unsigned long)’中:
/usr/local/include/ceres/internal/fixed_array.h:215:对‘google::LogMessageFatal::LogMessageFatal(char const*, int, google::CheckOpString const&)’未定义的引用
/usr/local/include/ceres/internal/fixed_array.h:215:对‘google::LogMessage::stream()’未定义的引用
/usr/local/include/ceres/internal/fixed_array.h:215:对‘google::LogMessageFatal::~LogMessageFatal()’未定义的引用
/usr/local/include/ceres/internal/fixed_array.h:215:对‘google::LogMessageFatal::~LogMessageFatal()’未定义的引用
CMakeFiles/pose_estimation_3d2d.dir/pose_estimation_3d2d.cpp.o:在函数‘std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >* google::MakeCheckOpString<unsigned long, unsigned long>(unsigned long const&, unsigned long const&, char const*)’中:
/usr/include/glog/logging.h:692:对‘google::base::CheckOpMessageBuilder::CheckOpMessageBuilder(char const*)’未定义的引用
/usr/include/glog/logging.h:694:对‘google::base::CheckOpMessageBuilder::ForVar2()’未定义的引用
/usr/include/glog/logging.h:695:对‘google::base::CheckOpMessageBuilder::NewString[abi:cxx11]()’未定义的引用
/usr/include/glog/logging.h:692:对‘google::base::CheckOpMessageBuilder::~CheckOpMessageBuilder()’未定义的引用
/usr/include/glog/logging.h:692:对‘google::base::CheckOpMessageBuilder::~CheckOpMessageBuilder()’未定义的引用
collect2: error: ld returned 1 exit status
CMakeFiles/pose_estimation_3d2d.dir/build.make:111: recipe for target 'pose_estimation_3d2d' failed
make[2]: *** [pose_estimation_3d2d] Error 1
CMakeFiles/Makefile2:168: recipe for target 'CMakeFiles/pose_estimation_3d2d.dir/all' failed
make[1]: *** [CMakeFiles/pose_estimation_3d2d.dir/all] Error 2
Makefile:90: recipe for target 'all' failed
make: *** [all] Error 2

 将CMakeLists.txt文件中设置为‘Release’不要设置为Debug即可解决此问题

set( CMAKE_BUILD_TYPE Release )

  • 6
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值