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

安裝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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章