remy source code(github) 编译错误在 protobuf 类
Remy source code(github) compilation error in protobuf class
我试图使用此链接中提供的入侵运行 Remy 项目(与计算机生成的网络协议相关(源代码; https://github.com/tcpexmachina/remy。代码也取自此链接。
我正在使用protobuf 3.5.1版本,Ubuntu版本是14.04。当我按照自述文件中的说明分别运行 ./autogen.sh 和 ./configure 后运行"make"命令时,我收到此错误:
In file included from configrange.hh:4:0,
from evaluator.cc:3:
../protobufs/dna.pb.h:4210:20: error: base class ‘struct
google::protobuf::internal::integral_constant<bool, true>’ has a
non-virtual destructor [-Werror=effc++]
template <> struct is_proto_enum< ::RemyBuffers::MemoryRange_Axis> :
::google::protobuf::internal::true_type {};
我查看了存储库的问题部分,但它没有列出任何此类错误。该项目是否有可能使用了导致此错误的旧版本的protobuf?还有人可以解释什么是"-Werror=effc++"标志吗?如果有人以前遇到过此错误或遇到过此类问题,请帮助我解决此错误。谢谢
标志-Weffc++
当您的代码违反 Scott Meyers 在他的书(有效C++系列(中定义的任何样式准则时启用警告。
其中一个准则告诉基类应该定义了虚拟析构函数 - 并且您得到了有关它的编译器消息。其他准则包括
Define a copy constructor and an assignment operator for classes with dynamically-allocated memory. Prefer initialization to assignment in constructors. Have operator= return a reference to *this. Don’t try to return a reference when you must return an object. Distinguish between prefix and postfix forms of increment and decrement operators. Never overload &&, ||, or ,.
通过启用-Weffc++
您只会收到警告,但我看到-Werror
也在编译器标志列表中定义。 -Werror
将所有警告变为错误
并且您的编译已中止。我认为您应该从编译器标志列表中删除Weffc++
或-Werror
来编译您的代码。
相关文章:
- 警告处理为错误这里有什么问题
- "error: no matching function for call to"构造函数错误
- boost::进程间消息队列引发错误
- Protobuf 生成的C++类无法针对 iOS 进行编译,并显示错误"Only virtual member functions can be marked 'final'"
- 致命错误:google/protobuf/port_def.inc:没有这样的文件或目录 #include < google/protobuf/port_def.inc>
- remy source code(github) 编译错误在 protobuf 类
- QT错误:运行代码后,在QT中获得Protobuf错误
- GRPC编译错误Protobuf 3.2.0(用旧版本的Protoc生成文件)Ubuntu 16.04
- 插入protobuf时SQLite无法识别的令牌错误:要处理哪些令牌以及如何处理?
- grpc & protobuf -- 错误:std::result_of<> 中没有名为 'type' 的类型
- Google Protobuf 3:使用 CMAKE 构建时未定义的引用错误
- Protobuf导致ParseFromIstream出现分段错误
- 如何获取有关protobuf解析过程中生成的错误的更多详细信息?(C++)
- C++2010 Express Protobuf编译错误
- C++Protobuf错误google::Protobuf::internal::kEmptyString错误
- protobuf中的错误处理
- 如何在解析文本格式的 protobuf 消息时忽略错误的字段
- 使用MingW链接protobuf错误
- 在c++中解析带有protobuf分段错误的Zeromq
- 编译Tensorflow时出现Protobuf错误