匿名用户
1级
2017-04-19 回答
1.需要安装Protocol Buffer
直接:apt-get install protobuf-compiler
安装完毕后,进入解压目录的Python目录,执行python setup.py install;安装python的protobuf库即可。
2.可以查询到它的大致用法
pijing@ubuntu:~/protobuffer$ protoc -h
Usage: protoc [OPTION] PROTO_FILES
Parse PROTO_FILES and generate output based on the options given:
-IPATH, --proto_path=PATH Specify the directory in which to search for
imports. May be specified multiple times;
directories will be searched in order. If not
given, the current working directory is used.
--version Show version info and exit.
-h, --help Show this text and exit.
--encode=MESSAGE_TYPE Read a text-format message of the given type
from standard input and write it in binary
to standard output. The message type must
be defined in PROT