在ubuntu上一键安装
sudoapt-get install protobuf-compiler2.定义proto文件
syntax = "proto3";
message pb_user_info {
string user_id = 1;
string leader_id = 2;
repeated string members = 3;
int32 status = 4;
}
3.编译proto文件
使用工具 http://lzltool.com/protobufconvert 生成序列化的c++文件。



