#include< leveldb / status.h>
…int arg_offset = 0;leveldb :: DB * db1;leveldb ::选项选项;options.error_if_exists = …
最后我能够(至少)解决编译错误。以下是我所做的更改:
leveldb::Status status1 = leveldb::DB::Open(options, argv[arg_offset+2], &db1)
auto status1 = leveldb::DB::Open(options, argv[arg_offset+2], &db1)
LIBRARIES += glog gflags protobuf leveldb snappy \ lmdb boost_system boost_filesystem hdf5_hl hdf5 m \ opencv_core opencv_highgui opencv_imgproc opencv_imgcodecs opencv_videoio
LIBRARIES += glog gflags protobuf leveldb snappy \ lmdb boost_system boost_filesystem hdf5_hl hdf5 m \ opencv_core opencv_highgui opencv_imgproc opencv_imgcodecs opencv_videoio X11
-std=c++11
代码能够编译。一旦我使用构建的对象加载LevelDB,就会更新。
的 编辑2 强> 编译的代码已成功运行。