前言
glog是google提供的一个日志库,glog在日常开发中的使用非常广泛。学习glog主要目的还是为了编译任乾大佬的多传感器融合框架。这里介绍下它的安装/编译和基本使用方法。
1.glog安装
参考:https://blog.csdn.net/kenstandlee/article/details/117031392
2.clion下配置glog
参考:https://www.freesion.com/article/6090935781/
3.踩坑
报错:/home/ls/glog_test/cmake-build-debug/glog_test: error while loading shared libraries: libglog.so.0: cannot open shared object file: No such file or directory
解决方案1:run->edit configuration->environment variable:LD_LIBRARY_PATH=/usr/local/lib
解决方案2:cmakelist中增加链接路径 link_directories("/usr/local/lib")
参考文献:https://www.cnblogs.com/szullc/p/6012305.html **动态链接库每次链接时都需要寻找动态库**
4.工作路径的配置
解决方案:run->edit configuration->work->directory:/home/ls/glog_test
参考文献
本文主要记录下学习历程,
https://blog.csdn.net/kenstandlee/article/details/117031392
https://www.freesion.com/article/6090935781/ **cmake配置glog**
http://www.manongjc.com/detail/13-erjxboyibmwzxlp.html **cmake**
https://blog.csdn.net/Pig_Pig_Bang/article/details/81632962 ****
https://www.cnblogs.com/hiloves/p/6009707.html **glog使用笔记**
https://www.freesion.com/article/7349364567/ **库文件copy到项目工程文件中**
|