18

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

JiTHiN
  • 6,548
  • 5
  • 43
  • 69
Jio
  • 1,146
  • 1
  • 9
  • 22

6 Answers6

22

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

enter image description here

Jio
  • 1,146
  • 1
  • 9
  • 22
16

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)

Mike Gledhill
  • 27,846
  • 7
  • 149
  • 159
4

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

backslash112
  • 2,105
  • 1
  • 24
  • 29
1

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

Cris
  • 464
  • 1
  • 3
  • 15
0

Try to add the libc++..tbd framework to your project. And compile again.enter image description here

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

Teja Nandamuri
  • 11,045
  • 6
  • 57
  • 109
  • error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/usr/lib/libc++.tbd is not an object file (not allowed in a library) – Jio Sep 22 '15 at 19:19
  • are you trying to integrate any other SDK into your project ? Or is it just a plain code template ? – Teja Nandamuri Sep 22 '15 at 19:22
  • i am trying to integrate my own library to this project.. Both having .dylib libraries. – Jio Sep 22 '15 at 19:24
  • Hi fixed it... https://forums.developer.apple.com/thread/4572. Add the dylib files into "Other Linker Flags". Thanks Mr.T for the support – Jio Sep 22 '15 at 20:22
0

I resolved it by:

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

That's All!

Bkillnest
  • 722
  • 9
  • 16