Mac安裝protobuf 流程

2021-09-25 11:32:36 字數 468 閱讀 1415

編譯

cd protobuf

./autogen.sh

./configure

make

安裝

make install

檢視

protoc --version

points

./autogen.sh是獲取googlemock,並生成對應的configure指令碼

./configure是進行環境檢測,並生成對應的makefile或makefile --prefix=/usr/local可以指定安裝路徑

make,按照makefile編譯工程

make install,執行makefile裡面的install部分,進行安裝 --prefix=/usr/local可以指定安裝路徑

原文:

mac編譯安裝protobuf

1 在安裝protobuf之前需要先安裝git make automake等工具,安裝方法請參考 2 在安裝好protobuf後需要安裝protobuf,依賴庫,首先使用 git clone 轉殖,如下圖所示 3 然後進入到protobuf目錄執行.autogen.sh,此時會出現 configur...

mac下protobuf的安裝

跳轉到解壓目錄 cd path protobuf 3.11.2 path同上 設定編譯目錄 configure prefix users a123 protobuf prefix 為安裝目錄,可自定義 make make install cd bash profile 檔案應在根目錄下 vim ba...

Protobuf在Mac上使用

protobuf在mac上使用 要在mac上使用protobuf,並用在xcode中 需要做如下操作 1wget 解壓縮1tar zxvf protobuf cpp 3.6.1.tar.gz 編譯 安裝 cd protobuf 3.6.1根目錄 autogen.sh是獲取googlemock,並生成...