当我在ubuntu上编译scribe server时,我得到了以下错误。
In file included from store.cpp:27:
scribe_server.h:45: error: conflicting return type specified for ‘virtual scribe::thrift::ResultCode scribeHandler::Log(const std::vector<scribe::thrift::LogEntry, std::allocator<scribe::thrift::LogEntry> >&)’
../src/gen-cpp/scribe.h:18: error: overriding ‘virtual scribe::thrift::ResultCode::type scribe::thrift::scribeIf::Log(const std::vector<scribe::thrift::LogEntry, std::allocator<scribe::thrift::LogEntry> >&)’
store.cpp: In member function ‘virtual bool ThriftFileStore::openInternal(bool, tm*)’我正在使用scribe 2.2和thrift 0.7.0,安装thrift时没有错误。
另外,我在一篇文章中读到,在使用旧版本的thrift时遇到了这个错误。但我使用的是最新版本的节俭。
发布于 2011-12-21 08:26:37
似乎是节俭的问题。
解决方案:使用thrift稳定版本
字面上抄袭应义良的话:
“我认为此问题与thrift ( git dev版本)最近的更改有关。对于诸如: enum X{ ... }X foo();thrift用于生成foo: X foo()的原型;但现在它生成"X::type foo();",从而导致您遇到的错误。”
答案在这里:http://groups.google.com/group/scribe-server/msg/b17bda3b80706558
https://stackoverflow.com/questions/8284145
复制相似问题