/libcaffe.so.1.0.0: undefined reference to `leveldb::Status::ToString() const'

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/mhsszm/article/details/88745120

安装caffe中的一个坑,以后遇到会往后加。
1。 `leveldb::Status::ToString() const’

[ 87%] Linking CXX executable caffe
../lib/libcaffe.so.1.0.0: undefined reference to `leveldb::DB::Open(leveldb::Options const&, std::string const&, leveldb::DB**)'
../lib/libcaffe.so.1.0.0: undefined reference to `leveldb::Status::ToString() const'
collect2: error: ld returned 1 exit status
tools/CMakeFiles/caffe.bin.dir/build.make:133: recipe for target 'tools/caffe' failed
make[2]: *** [tools/caffe] Error 1
CMakeFiles/Makefile2:457: recipe for target 'tools/CMakeFiles/caffe.bin.dir/all' failed
make[1]: *** [tools/CMakeFiles/caffe.bin.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

解决办法 ,检查编译器版本,我的是 4.8.5,

gcc --version
gcc (Ubuntu 4.8.5-4ubuntu2) 4.8.5
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

将其更改为系统默认的编译器版本,更改方式 ,见:
https://blog.csdn.net/mhsszm/article/details/81433709

猜你喜欢

转载自blog.csdn.net/mhsszm/article/details/88745120