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