其他分享
首页 > 其他分享> > glog编译报错解决

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, 问题解决

标签:gcc,reference,lib,glog,编译,报错,usr,local,undefined
来源: https://blog.csdn.net/CSDN_WHB/article/details/113574045