glog编译报错解决

1.编译命令

g++ type_info.cc -o type_info -std=c++11 -lglog

2.报错信息

/usr/local/lib/libgflags.so.2.2: undefined reference to `__cxa_throw_bad_array_new_length@CXXABI_1.3.8'
/usr/local/lib/libgflags.so.2.2: undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20'
/usr/local/lib/libglog.so: undefined reference to `operator delete(void*, unsigned long)@CXXABI_1.3.9'

3.当前gcc版本

gcc (GCC) 4.8.5

4.解决方式

升级gcc至gcc (GCC) 7.3.1, 问题解决

上一篇:基于VINS与FastPlanner的无人机自主飞行Gazebo仿真


下一篇:踩坑日记(2)