
protobuf
文章平均质量分 52
ziggy7
这个作者很懒,什么都没留下…
展开
-
protobuf c++ example
defines messagesaddressbook.proto.person类型内定义了枚举PhoneType和PhoneNumber类型,PhoneNumber类型使用PhoneType类型syntax = "proto2";// 防止命名冲突package tutorial;message Person { // optional 0个或1个 optional string name = 1; optional int32 id = 2; optional strin原创 2021-04-07 10:41:02 · 426 阅读 · 0 评论 -
protobuf
https://github.com/protobuf-c/protobuf-c/wiki/Examplesamessage.proto文件message AMessage { required int32 a=1; optional int32 b=2;}生成.h 和.c文件protoc-c --c_out=. amessage.proto 链接-lprotobuf-cSerialize/packconstruct message :AMESSAGE_INITb是否存在(原创 2021-04-06 17:39:51 · 183 阅读 · 0 评论