xcode .dylib 文件丢失
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32724799/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
.dylib file is missing
提问by Jio
I am trying to compile my project in iOS 9. I am using XCode7. Here is how it looks like: error:
我正在尝试在 iOS 9 中编译我的项目。我使用的是 XCode7。这是它的样子:错误:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't open file: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/usr/lib/libz.dylib (No such file or directory)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't open file: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/usr/lib/libiconv.dylib (No such file or directory)
My dylib files shows in red color so i tried to add it again but the is no dylib files, all the files are shown in .tbd
instead of .dylib
. Please help me on this..
我的 dylib 文件显示为红色,所以我尝试再次添加它,但没有 dylib 文件,所有文件都显示在.tbd
而不是.dylib
. 请帮我解决这个..
回答by Jio
At last i fixed it. https://forums.developer.apple.com/thread/4572. Add the dylib files into "Other Linker Flags".
最后我修好了。 https://forums.developer.apple.com/thread/4572。将 dylib 文件添加到“其他链接器标志”中。
回答by Mike Gledhill
Here's what worked for me.
这对我有用。
- Go into your Targets, Build Phases, "Link Binary with libraries", and click on the + button.
- 进入您的目标,构建阶段,“将二进制文件与库链接”,然后单击 + 按钮。
- Click on the "Add other..." button
- 单击“添加其他...”按钮
- Hit CMD+Shift+G to open the "Go to folder" dialog, and cut'n'paste the folder:
/usr/lib
- 按 CMD+Shift+G 打开“转到文件夹”对话框,然后剪切'n'粘贴文件夹:
/usr/lib
- In the top-right search box, type in a section of your "missing" file, which for me, was
libsqlite3.dylib
, then click on Open.
- 在右上角的搜索框中,输入“丢失”文件的一部分,对我来说是
libsqlite3.dylib
,然后单击“打开”。
This should link in the file which was previously missing.
这应该链接到以前丢失的文件中。
(Tested with Xcode 7.1)
(使用 Xcode 7.1 测试)
回答by backslash112
Remove it from "Link Binary with Libraries" fixed my error.
从“Link Binary with Libraries”中删除它修复了我的错误。
回答by Cris
libz.dylib is now found under libz.tbd
现在可以在 libz.tbd 下找到 libz.dylib
the .tbd files are new "text-based stub libraries", that provide a much more compact version of the stub libraries for use in the SDK
.tbd 文件是新的“基于文本的存根库”,它提供了一个更紧凑的存根库版本以供在 SDK 中使用
回答by Bkillnest
I resolved it by:
我通过以下方式解决了它:
Go to Your Target --> Build phases --> Link Binary With Libraries --> Add libiconv.dylib
转到您的目标 --> 构建阶段 --> 将二进制文件与库链接 --> 添加 libiconv.dylib
That's All!
就这样!