protobuf2.5 iphone5s中崩溃的问题

我们的游戏用到了protobuf2.5,在其他版本中都是好的,但iphone5s中崩溃,表现为针对DescriptorPool为空了。网上也找不到什么信息,xiaozhong同学各种尝试,都没有搞定,太TMD折腾了。后来从这里获取了解决方案:

http://stackoverflow.com/questions/19848118/weird-ios-libprotobuf-dylib-cause-crash/20406591#20406591

Yes, ImageLoader on the newer devices (iPhone 5S and apparently iPad air) has its own copy of Protocol Buffers which causes symbol collisions.

I hacked around this by editing my google/protobuf/stubs/common.h and inserting the following line near the top of the file:

#define google myapp

Now, my copy of the Google protobuf implementation uses the namespace "myapp" instead of "google" and so the symbols don't collide with the system ones.

按照这个提示修改后,就可以了。我只是大致知道怎么回事,有时间再回来分析具体原因。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值