Mac安装protobuf 流程

下载

https://github.com/google/protobuf/releases 找到对应版本下载git

编译

cd protobuf
./autogen.sh
./configure
makegithub

安装

make installgoogle

查看

protoc --versioncode

Points

  1. ./autogen.sh是获取GoogleMock,并生成对应的configure脚本
  2. ./configure是进行环境检测,并生成对应的makefile或Makefile  --prefix=/usr/local能够指定安装路径
  3. make,按照makefile编译工程
  4. make install,执行makefile里面的install部分,进行安装       --prefix=/usr/local能够指定安装路径
相关文章
相关标签/搜索