Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.dylib file is missing

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..

like image 485
Jio Avatar asked Sep 22 '15 18:09

Jio


2 Answers

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

enter image description here

like image 63
Jio Avatar answered Oct 08 '22 09:10

Jio


Here's what worked for me.

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

enter image description here

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

enter image description here

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

enter image description here

  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.

enter image description here

This should link in the file which was previously missing.

(Tested with Xcode 7.1)

like image 15
Mike Gledhill Avatar answered Oct 08 '22 09:10

Mike Gledhill