您的位置:首页 > 其它

protobuf2.5 iphone5s中崩溃的问题

2013-12-11 10:54 225 查看
我们的游戏用到了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.

按照这个提示修改后,就可以了。我只是大致知道怎么回事,有时间再回来分析具体原因。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: