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

1186 ワード

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