ProtoBuf3.3 安裝記錄


翻了很多教程,下載了 PB 的源碼在自己的 mac 上編譯及安裝,記錄下新的

1. 首先是下載源碼了 https://github.com/google/protobuf/releases 

雖然是 github,建議開代理,下載速度快一些。

2. tar -zxvf 解壓源碼后,需要編譯, 在新版的 PB 源碼中,是不包含 .configure 文件的,需要生成,此時先執行 ./autogen.sh 。

腳本說明如下:

# Run this script to generate the configure script and other files that will
# be included in the distribution. These files are not checked in because they
# are automatically generated.

3. 此時生成了 .configure 文件,可以開始編譯了

./configure --prefix=/Users/xielu/IdeaProjects/PB/

make && make install

Done
由於本人是用 golang 開發,還需要配置相關插件~ 此時待續

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM