Using an ARC static library in a NON-ARC project

Yannick picture Yannick · Dec 1, 2011 · Viewed 8.1k times · Source

I am trying to get this sorted out. I know how to get an ARC project working with files or static lib's that are not using ARC. For instance, using the compiler flags -fno-objc-arc.

But what if I have a project that is not using ARC and want to include a static library compiled with ARC? Every time I want to build the project it is telling me that it doesn't recognize things like "strong, __unsafe_unretained,...".

Answer

wL_ picture wL_ · Apr 14, 2012

To add on to shw's answer. Add -fobjc-arc to compiler flags under build phases to ARC files to make them compile correctly for non-ARC projects.

More info here