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

it2022-05-28  67

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。

转载于:https://www.cnblogs.com/xiaouisme/archive/2012/02/13/2348761.html


最新回复(0)