XCode 4.2 linker error Library not found -lFlurryAnalytics

家住魔仙堡 提交于 2019-12-12 12:17:07

问题


I am getting this error when trying to build my project. I have a paid / free version the paid version is working just fine with the same library. However for some reason the free version is having a hard time with the Flurry Analytics library which is the same file version as the paid app. I added it by going to Add > Existing Frameworks... Add Other and browsed to the library in the paid apps folder. I am not sure what else to try I have made sure the project settings between paid and free version are identical, I have tried coping that file locally, I have googled and googled and am coming up short.

using Xcode 4.2 with iOS 5

Thanks in advance.


回答1:


Check if library is added in TARGETS -> Link Binary With Libraries. Mostly it will be there but wrong version. If you change the iOS version you should change binary as well. e.g. libz.1.dylib is in iOS7 link binary. But if you change to iOS9.1 you have to delete libz.1.dylib and add one from iOS9.1 libz.1.tbd




回答2:


it's likely not in the list of ld's search paths. either qualify the path or add its parent to the list of directories for ld to search.




回答3:


We just had a project fail to build after upgrading to Xcode 4.2. In our case the error was:

ld: library not found for -lz.1.2.3
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang failed with exit code 1

It turns out that this particular SDK library changed versions, and the file we were pointing to is no longer included in the latest distribution.

To fix it, I clicked on the libz.1.2.3.dylib entry in the Xcode Project Navigator pane. (It was highlighted in a red font because its path was incorrect.) Next, in the Xcode Utilities pane, in the File Inspector tab, I clicked on the "Choose File" icon beneath the Location listbox which is set to "Relative to SDK". I navigated to /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/ and found that libz.1.2.3.dylib didn't exist, so I chose the latest version libz.1.2.5.dylib.



来源:https://stackoverflow.com/questions/7885374/xcode-4-2-linker-error-library-not-found-lflurryanalytics

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!