美文网首页
Google Protobuf out objc

Google Protobuf out objc

作者: NieFeng1024 | 来源:发表于2018-05-31 16:30 被阅读8次

一. 安装终端protobuf编译生成.h .m工具

1.下载3.5.1版本objective-c

https://github.com/google/protobuf/releases

3.5.1.png

2. 解压进入执行下面命令

cd protobuf-3.0.0
./configure
make -j8
sudo make install

二. 编写 .proto 文件, 生成 .protoc.h .protoc.m文件

cd /Users/XXX/Desktop
1. 在桌面创建一个文件夹dir_pro
2.在dir_pro文件夹中创建一个 XXX.proto 文件
3. cd /Users/XXX/Desktop
使用protoc 命令生成objc文件

protoc --proto_path=dir_pro --objc_out=dir_pro dir_pro/XXX.proto

GoogleProtobuf_hello_Github

相关文章

网友评论

      本文标题:Google Protobuf out objc

      本文链接:https://www.haomeiwen.com/subject/uinqsftx.html