TCP/Protobuf之Protocol Buffers配置指南
2016-06-27 14:43
609 查看
使用Protobuf,先配置环境,以下是配置Protobuf的步骤和编译Protobuf原文件的步骤
–proto_path可以缩写为: -I
Add
or
Add
If the target is using ARC, remember to turn off ARC (
The files generated by
Java:
Compiled Environment Download:
https://github.com/google/protobuf/releases/download/v3.0.0-beta-3/protobuf-java-3.0.0-beta-3.zipInstall:
$ ./configure $ make $ make check $ make install
Check version:
$ protoc --version
Protocol Buffers Output
https://developers.google.com/protocol-buffers/To Objective-C(.h .m)
$ protoc --proto_path=src --objc_out=build/gen src/foo.proto src/bar/baz.proto
To Java(.java)
$ protoc --proto_path=src --java_out=build/gen src/foo.proto
–proto_path可以缩写为: -I
Objective-C:
Download:
https://github.com/google/protobuf/releases/download/v3.0.0-beta-3/protobuf-objectivec-3.0.0-beta-3.zipInstall:
$ objectivec/DevTools/full_mac_build.sh
Building:
There are two ways to include the Runtime sources in your project:Add
objectivec/\*.h&
objectivec/GPBProtocolBuffers.mto your project.
or
Add
objectivec/\*.h&
objectivec/\*.mexcept for
objectivec/GPBProtocolBuffers.mto your project.
If the target is using ARC, remember to turn off ARC (
-fno-objc-arc) for the
.mfiles.
The files generated by
protocfor the
*.protofiles (
\*.pbobjc.h' and*.pbobjc.m`) are then also added to the target.
相关文章推荐
- HTTP、TCP/IP协议与socket之间的区别
- 阮一峰的网络日志 » 首页 » 档案
- HTTP幂等性
- Ubuntu12.04 上网静态IP配置方法
- LTE 网络架构
- TCP/Protobuf之Netty学习
- C++编程笔记:使用WinHTTP实现HTTP访问(解决接收UTF8数据乱码问题)
- linux网络编程常用头文件
- TCP/Protobuf之基础知识准备
- Android使用VideoView播放网络视频,获取网络视频缩略图
- 奇葩问题:HTTP Status 404
- 目前网络上开源的网络爬虫以及一些简介和比较
- OKHttp请求网络数据
- RTP/RTSP/RTCP有什么区别?
- tcp序列号回绕与解决
- ASP.NET路由系统实现原理:HttpHandler的动态映射
- HTTP图解笔记
- 【转载】浅谈HTTP中Get与Post的区别
- Android网络请求框架剖析一、Okhttp
- 我最喜欢的网络小说