将 protobuf 打包成 iOS 静态库 xcode4.6.2
2013-11-12 17:12
295 查看
1、创建静态库工程 :protobuf
2.(github上去下载protobuf 2.5.0 [本人用的是2.5.0])在protobuf的源代码跟文件夹中创建一个文件夹xcodeproject
3.将刚刚创建的的工程关闭,并将工程剪切到新建的文件夹内,并打开工程
删除protobuf.h和protobu.m
4.将下图的google文件夹拖到工程中
5.选项如下图
6.删除complier文件夹(选择remove references)
7.将所有的unitest测试文件删除掉(选择remove references)
8.添加header search path
9.command+b进行编译
报错 config.h 无法找到
10.终端进入protobuf文件夹
输入命令
export CC=llvm-gcc; export CXX=llvm-g++; ./configure
并执行
执行完之后 会生成 config.h ,将config.h拖入工程 中,选 copy to
进入 xcode config.h 文件中
1、将 文件 中的 std::tr1 全部换成 std
2、将所有的 tr1 删除掉
11、编译一下就成功了
2.(github上去下载protobuf 2.5.0 [本人用的是2.5.0])在protobuf的源代码跟文件夹中创建一个文件夹xcodeproject
3.将刚刚创建的的工程关闭,并将工程剪切到新建的文件夹内,并打开工程
删除protobuf.h和protobu.m
4.将下图的google文件夹拖到工程中
5.选项如下图
6.删除complier文件夹(选择remove references)
7.将所有的unitest测试文件删除掉(选择remove references)
8.添加header search path
9.command+b进行编译
报错 config.h 无法找到
10.终端进入protobuf文件夹
输入命令
export CC=llvm-gcc; export CXX=llvm-g++; ./configure
并执行
执行完之后 会生成 config.h ,将config.h拖入工程 中,选 copy to
进入 xcode config.h 文件中
1、将 文件 中的 std::tr1 全部换成 std
2、将所有的 tr1 删除掉
11、编译一下就成功了
相关文章推荐
- py2exe打包的时候报错protobuf/pkg_resources找不到
- ios开发使用xcode6打包protobuf静态库 解决了 官方引用 protobuf 导致的冲突问题 包含 arm64 支持
- cocos creator: js中实现protobuf的打包和解析
- py2exe打包含有protobuf模块的代码
- google protobuf---java api的链接
- c++ 使用pbc 解决lua 解析protobuf 问题
- Google protobuf
- 用protobuf定义消息及处理
- Protobuf协议的Java应用例子
- 求教 ProtoBuf 交互传值 socket 发包 C++ 传stream 到 java 反序列化失败 问题
- vs2015编译protobuf-3.1.0
- protobuf3语言指南
- protobuf使用方法
- 基于Netty5.0高级案例二之WebSocket中关于使用ProtoBuf传输数据介绍js部分
- linux Anaconda2 ImportError: No module named google.protobuf
- Google 的开源技术protobuf 简介与例子
- 最快的序列化组件protobuf的.net版本protobuf.net
- protobuf 系列 ---------下载、编译与使用
- Go语言的RPC介绍(含Protobuf-RPC)
- Protobuf在微信小游戏开发中的使用技巧