Elton's Blog

Tag: -all_load

iPhone开发库引用的问题

by on 十二.23, 2009, under iPhone

最近的项目用到了著名的Three20界面库, 程序发布完成结果背Apple拒绝,理由是使用了Private APIs, 没话说,肯定是Three20的问题。
于是获取最新代码,编译之后对可执行文件进行扫描确认没有Private APIs被调用了之后再build最终版本以提交App Store, 不知道是哪根筋不对突然觉得是否应该在真机上编译个release版本再提交,不然又要等若干天,万一被打回又得耽误功夫。
果然,一试吓一跳, 无法运行,原因是Three20中的所有对SDK种类的扩展都没被打包编译进来,运行时无法找到相应的selector,当然就crash了
开始是google搜寻答案,屡试之后,静下心来看看Three20的文档, 看到最后才恍然大悟,原来还需要一个 -all_load 连接选项。添加后编译运行,一切顺利, god。
然后翻阅水果文档,才知道 -all_load link option连接选项是告诉编译器将所连接的库全部包含,而不是用到才引入。

引自:http://www.flyblog.info/tag/three20

1 Comment :, more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit my friends!

A few highly recommended friends...