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能夠指定安裝路徑
相關文章
相關標籤/搜索