微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

xcode c++ 编程使用protobuf

1、我当前使用的mac OS系统是:

 macOS Mojave

Version 10.14.6

2、Command Line Tools:

Xcode Version 11.3.1 (11C504)

3、安装protobuf,

如果你愿意,可以选择源码安装,

我的开发环境采用port管理维护,所以port安装(Centos下使用yum,Ubuntu使用sudo apt-get),安装 protobuf-c protobuf3-cpp,执行命令:

macbook-pro:~ username$ sudo port install protobuf-c

--->  Computing dependencies for protobuf-c

The following dependencies will be installed:  protobuf3-cpp

Continue? [Y/n]: Y

--->  Fetching archive for protobuf3-cpp

--->  Attempting to fetch protobuf3-cpp-3.17.3_0.darwin_18.x86_64.tbz2 from https://pek.cn.packages.macports.org/macports/packages/protobuf3-cpp

--->  Attempting to fetch protobuf3-cpp-3.17.3_0.darwin_18.x86_64.tbz2.rmd160 from https://pek.cn.packages.macports.org/macports/packages/protobuf3-cpp

--->  Installing protobuf3-cpp @3.17.3_0

--->  Activating protobuf3-cpp @3.17.3_0

--->  Cleaning protobuf3-cpp

--->  Fetching archive for protobuf-c

--->  Attempting to fetch protobuf-c-1.4.0_0.darwin_18.x86_64.tbz2 from https://pek.cn.packages.macports.org/macports/packages/protobuf-c

--->  Attempting to fetch protobuf-c-1.4.0_0.darwin_18.x86_64.tbz2.rmd160 from https://pek.cn.packages.macports.org/macports/packages/protobuf-c

--->  Installing protobuf-c @1.4.0_0

--->  Activating protobuf-c @1.4.0_0

--->  Cleaning protobuf-c

--->  Scanning binaries for linking errors

--->  No broken files found.                             

--->  No broken ports found.

4、使用protobuf编程,

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐