在对glog进行make操作时报错如下:
解决办法:
重新安装gflags和glog,按如下方式进行安装:
1)安装gflags
git clone https://github.com/gflags/gflags.git
cd gflags
mkdir build && cd build
cmake -DGFLAGS_NAMESPACE=google -DCMAKE_CXX_FLAGS=-fPIC -DBUILD_SHARED_LIBS=ON ..
make -j4
sudo make install
sudo ldconfig
2)安装glog
git clone https://github.com/google/glog
./autogen.sh
./configure -DGFLAGS_NAMESPACE=google -DCMAKE_CXX_FLAGS=-fPIC -DBUILD_SHARED_LIBS=ON ..
make -j8
sudo make install
成功安装如下图所示:
或者(建议方法):
git clone https://github.com/google/glog
cd glog
mkdir build && cd build
cmake -DGFLAGS_NAMESPACE=google -DCMAKE_CXX_FLAGS=-fPIC -DBUILD_SHARED_LIBS=ON ..
make
sudo make install
在运行VINS-Fusion是一直报错,用第二种方法安装glog,最终成功运行!
最后,再做如下配置(若安装好之后,使用无报错,可不用如下操作):
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
参考链接:
https://blog.csdn.net/weicao1990/article/details/82896372
https://www.cnblogs.com/freeweb/p/10696872.html
https://blog.csdn.net/qq_22634949/article/details/101718879