美文网首页
Mac上搭建Protobuf编译环境及简单使用

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

作者: YasinWei | 来源:发表于2016-07-12 01:03 被阅读0次

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

相关文章

网友评论

      本文标题: Mac上搭建Protobuf编译环境及简单使用

      本文链接:https://www.haomeiwen.com/subject/bbvjjttx.html