XCode 4.2链接器错误未找到库-lFlurryAnalytics
我在尝试构建项目时收到此错误。我有一个付费/免费版本,付费版本可以在同一个库中正常工作。然而,由于某种原因,免费版本在使用 Flurry Analytics 库时遇到了困难,该库与付费应用程序的文件版本相同。我通过添加>添加它现有框架...添加其他并浏览到付费应用程序文件夹中的库。我不知道还可以尝试什么,我已经确保付费版本和免费版本之间的项目设置是相同的,我已经尝试在本地处理该文件,我已经用谷歌搜索了一遍,但发现不够。
在 iOS 5 中使用 Xcode 4.2
提前致谢。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
检查 TARGETS -> 中是否添加了库将二进制文件与库链接。大多数情况下它都会存在,但版本错误。如果您更改 iOS 版本,您也应该更改二进制文件。
例如 libz.1.dylib 位于 iOS7 链接二进制文件中。
但如果你换成iOS9.1,你必须删除libz.1.dylib并从iOS9.1 libz.1.tbd添加一个
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
它可能不在 ld 的搜索路径列表中。限定路径或将其父级添加到目录列表中以供 ld 搜索。
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.
对于最近遇到此问题的人:我在将项目从旧版本的 React Native 更新到新版本时遇到此错误。要解决像 user2661518 建议的问题,您可能需要进行一些搜索。我在项目导航器中选择了我的项目,选择了我的目标,然后在构建阶段下打开了链接二进制文件与库选项。我必须通过选择并单击“-”图标来删除引发错误的库,然后通过单击“+”图标并选择它来重新添加它(我的库位于 Pods 下)。
For anyone having this issue recently: I had this error when updating a project from an older version of React Native to a newer one. To resolve the issue like user2661518 suggested you may have to search a little. I selected my project in the Project Navigator, selected my Target, and under Build Phases opened up the Link Binary With Libraries option. I had to remove the library that was throwing the error by selecting it and clicking the "-" icon, and then re-added it by clicking the "+" icon and selecting it (mine was under Pods).
升级到 Xcode 4.2 后,我们刚刚遇到了一个项目无法构建的情况。在我们的例子中,错误是:
事实证明,这个特定的 SDK 库更改了版本,并且我们指向的文件不再包含在最新的发行版中。
为了修复这个问题,我单击了 Xcode Project Navigator 窗格中的 libz.1.2.3.dylib 条目。 (它以红色字体突出显示,因为其路径不正确。)接下来,在 Xcode 实用程序窗格中的“文件检查器”选项卡中,我单击“位置”列表框下方的“选择文件”图标,该图标设置为“相对于 SDK” ”。我导航到/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/,发现libz.1.2.3.dylib不存在,所以我选择了最新版本的libz.1.2 .5.dylib。
We just had a project fail to build after upgrading to Xcode 4.2. In our case the error was:
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.