0

在 ubuntu 上编译 scribe 服务器时出现以下错误。

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*)’

我正在使用带有 thrift 0.7.0 的 scribe 2.2 安装 thrift 时没有错误。

此外,我在一篇文章中读到,在使用旧版本的 thrift 时会遇到此错误。但我正在使用最新版本的节俭。

4

1 回答 1

0

似乎是节俭的问题。

解决方法:使用thrift稳定版

从字面上复制梁英义的话:

“我认为这个问题与最近 Thrift 的变化(git dev 版本)有关。对于像这样的 thrift 片段: enum X { ... } X foo(); thrift 用于为 foo 生成这个原型:X foo(); 但现在它生成“X::type foo();”,导致你遇到的错误。”

在这里回答:http ://groups.google.com/group/scribe-server/msg/b17bda3b80706558

于 2011-12-21T00:26:36.730 回答