protobuf编译出错的解决方案(iOS,OSX)
2016-12-29 14:29
786 查看
protobuf
最近使用protobuf,变编译工具时遇上一点问题.现在附上解决方案编译过程
完全参照https://github.com/alexeyxo/protobuf-objc
编译出错
遇到如下错误./google/protobuf/objectivec-descriptor.pb.h:17:2: error: This file was generated by an older version of protoc which is #error This file was generated by an older version of protoc which is ^ ./google/protobuf/objectivec-descriptor.pb.h:18:2: error: incompatible with your Protocol Buffer headers. Please #error incompatible with your Protocol Buffer headers. Please ^ ./google/protobuf/objectivec-descriptor.pb.h:19:2: error: regenerate this file with a newer version of protoc. #error regenerate this file with a newer version of proton.
解决方案
根据文档中ln -s /usr/local/Cellar/protobuf/2.6.1/bin/protoc /usr/local/bin
作者应该使用2.6.1编译的,我将brew中的protobuf降级到了2.6.0(现在安装是3.1.0).
结果可以顺利编译
另外附上降级指南http://sanwen8.cn/p/5a9lM4E.html
相关文章推荐
- 关于google的protobuf在vs的release版下编译出错的解决方案
- protobuf-IOS简单总结(编译、环境搭建)
- 如何编译protobuf for IOS
- vs2013编译protobuf(Goole Protocol Buffers)源码错误解决方案
- ios 编译protobuf.a库脚本
- protobuf2.5在iOS上编译及cocos2dx混合使用的问题
- Xcode7编译遇到building for iOS simulator, but linking in object file built for OSX, for architectu问题解决方案
- protobuf 编译iOS,lib curl缺少行 x86_64的解决方法
- 编译qtopia时出错解决方案
- protobuf windows java 环境搭建(编译出protobuf需要的jar包,解决编译时OutOfMemory的问题)
- 编译QT4.8.2完成之后,mingw32-make install时出错的解决方案
- Google Protobuf的安装、配置、以及简单demo编译
- memset和printf(buf)编译出错
- 对protobuf进行ndk编译 config.h文件修改部分
- 关于google protobuf编译找不到不到google\protobuf\stubs\common.h头文件的问题
- OpenSource.iOS.ProtobufWithObjective-C
- muduo 0.9.3 protobuf示例编译不过
- 交叉编译 google protobuf
- Android NDK下编译google protocol buffer(protobuf)
- 交叉编译 google protobuf