grpc compile & install on Mac

https://www.shenhongbang.cc/gPRCForMac.html
这个链接些的特别清楚
1) 下载grpc 代码

 $ git clone --recurse-submodules -b v1.45.0 --depth 1 --shallow-submodules https://github.com/grpc/grpc

2)安装 abseil
、、、
cd third_party/abseil-cpp
cmake . -DABSL_RUN_TESTS=ON -DABSL_USE_GOOGLETEST_HEAD=ON -DCMAKE_CXX_STANDARD=11
make
make install
、、、
3)安装protobuf3
、、、
cd third_party/protobuf
./autogen.sh //运行脚本(此处需FQ,加载资源);
./configure //运行脚本;
make //编译;
make check //检查依赖包是否完整,终端会输出7个检查项,都显示pass即可;
make install //安装PB;
protoc --version //不报错,输出版本信息,即可
、、、
4)编译 gRPC
、、、
cd grpc 的目录
make
make install

、、、

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容