Mac上搭建Protobuf编译环境及简单使用

1、下载protobuf

使用git的方式到开源社区下载protobuf,在终端种输入以下命令:

git clone https://github.com/google/protobuf.git

2、安装brew

ruby -e "$(curl -fsSL  https://raw.githubusercontent.com/Homebrew/install/master/install)"

3、使用brew安装protoc

brew install protobuf

4.安装 automake

brew install automake

brew install libtool

5、将ProtoBuf协议文件编译为OC文件

protoc –objc_out=./    test.proto

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容