连接的静态库有库类使用category时。。。

When using a static library which includes categories we will also have to add the “-ObjC” flag to the “Other Linker Flags” build setting. This will force the linker to load all objective-c classes and categories from the library. If the library contains only categories “-all_load” or “-force_load” may be needed as well. See Technical Q&A QA1490 for a more detailed explanation of these settings.

 

当静态库有库自己使用的category时,应当把静态库配置Build Settings\Linking\Other Linker Flags\里加入-all_load和-ObjC,

而使用此静态库的app需要配置Build Settings\Linking\Other Linker Flags\里加入-ObjC。

posted @ 2012-02-13 10:48  小鼬就是我  阅读(332)  评论(0编辑  收藏  举报