iPhone static library linking problem

I having trouble with app that uses my static libs. Here is my setup: I have 3 libs, Utilities, Share and Misc. Share and Misc depend on Utilities. They are compiling just fine when I compile them separately. Every lib is in its own XCode project.

I want to build an app that uses features from Utilities and Share, so I added them into the project as direct dependencies. I see them listed in target "Link binary with libraries". I also see quite a lot of linking errors in the compilation results. Those error relate to 3rd parties code that is used in libraries, for example ASIHTTPRequest. Such 3rd party stuff I keep in one place and I just added path to that directory in "Header Search Paths".

Example error:

objc-class-ref-to-ASIHTTPRequest in libShare.a(SomethingThatIsInLib.o)

It's confusing because libs alone are compiling just fine but when I try to compile the app, it's throwing such errors. What am I doing wrong?

Answers


Add the -all_load and -ObjC flags to "Other Linker Flags" in the Xcode project settings.


Need Your Help

How to display upcoming birthdays?

php mysql sql date-of-birth

I know I'm not the first one who is asking how to display upcoming birthdays. But unfortunately all the other answers didn't help me finding out how to do it.