-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Static Library fails to link because of OTHER_LD_FLAGS from Pods.xcconfig #826
Comments
Can you elaborate on what you had to change and into what and why? |
I had to change my target's |
I get this as well. If (from example at http://docs.cocoapods.org/specification.html#libraries) I add s.library = 'z' to the podspec I'm building and using internally, my consuming project fails to build and has OTHER_LDFLAGS set to -lz. I've also seen this from another library that libz, ZipArchive. How can this be resolved? What's the best approach for writing static libraries that include pods that required linked libraries, like libz or libxml? |
These issues also occurs when your Workspace Build settings are pointing to Legacy. Change it to Xcode Defaults or Custom to get this working. |
This ticket got lost in my overview. I understand the issue now. The important thing is to understand that typically you don’t link static libraries against other static libraries. You either pull them all into an application, or you use lipo to stitch them all together into one static library. In any case, if you really want to build a non Pods static library with a Pods xcconfig file, you can override |
1.3.7 UrbanAirship-iOS-SDK.podspec
empty OTHER_LDFLAGS really is the solution. Thanks. Maybe it can be reconsider for static library targets to include this solution. |
I think it is the best solution. |
I am still experiencing this issue with the latest cocoa pods.
|
I'm having the same issue. Looks like a regression in Xcode 6.4 when building libraries.
|
So,What's the best solution? |
I recently created a Static Library project, created my Podfile and added a pod which requires zlib. After a
pod install
thePods.xcconfig
containsOTHER_LDFLAGS = -ObjC -lz
Which is not unexpected, however, when trying to build I get this output:
After some research it would seem that specifying these kinds of flags for a static library is not correct. Once I overrode the
Pods.xcconfig
OTHER_LDFLAGS
in my target the error did not persist.The text was updated successfully, but these errors were encountered: