![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
protobuf
文章平均质量分 52
ziggy7
这个作者很懒,什么都没留下…
展开
-
protobuf c++ example
defines messages addressbook.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 · 339 阅读 · 0 评论 -
protobuf
https://github.com/protobuf-c/protobuf-c/wiki/Examples amessage.proto文件 message AMessage { required int32 a=1; optional int32 b=2; } 生成.h 和.c文件 protoc-c --c_out=. amessage.proto 链接 -lprotobuf-c Serialize/pack construct message :AMESSAGE_INIT b是否存在(原创 2021-04-06 17:39:51 · 135 阅读 · 0 评论