安装Protobuf
两个方法安装:
- Google官方Protobuf项目,官方文档
- 通过Homebrew安装,
brew install protobuf
支持iOS
Get the Script
git clone https://gist.github.com/9487468ae3375d0db0cc.git build-protobuf
Performing the Build
$ cd build-protobuf |
Add --interactive
to the above script if you would like the script to stop after each major operation. This makes it easier to inspect the output from the various steps for potential errors.
Add --master
if you would prefer to build from the master branch in the Google Protobuf git repo.
Results
Build results are found in a folder called protobuf-{version}
, where {version}
will be either 2.6.1
or master
. This folder contains bin
, include
and lib
folders.
Integration with Xcode
Create a build rule in your Xcode project with the following settings.
|