.dylib file is missing

╄→гoц情女王★ 提交于 2019-11-30 00:49:38

问题


I am trying to compile my project in iOS 9. I am using XCode7. Here is how it looks like: 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/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..


回答1:


At last i fixed it. https://forums.developer.apple.com/thread/4572. Add the dylib files into "Other Linker Flags".




回答2:


Here's what worked for me.

  1. Go into your Targets, Build Phases, "Link Binary with libraries", and click on the + button.

  1. Click on the "Add other..." button

  1. Hit CMD+Shift+G to open the "Go to folder" dialog, and cut'n'paste the folder: /usr/lib

  1. In the top-right search box, type in a section of your "missing" file, which for me, was libsqlite3.dylib, then click on Open.

This should link in the file which was previously missing.

(Tested with Xcode 7.1)




回答3:


Remove it from "Link Binary with Libraries" fixed my error.




回答4:


libz.dylib is now found under libz.tbd

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

see Swift 2 / iOS 9 - libz.dylib not found




回答5:


Try to add the libc++..tbd framework to your project. And compile again.

Also try to add libiconv.dylib to your project frameworks.




回答6:


I resolved it by:

Go to Your Target --> Build phases --> Link Binary With Libraries --> Add libiconv.dylib

That's All!



来源:https://stackoverflow.com/questions/32724799/dylib-file-is-missing

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