directory not found Apple Mach-O linker warning but Library Search Path and Framework Search Path are empty directory not found Apple Mach-O linker warning but Library Search Path and Framework Search Path are empty ios ios

directory not found Apple Mach-O linker warning but Library Search Path and Framework Search Path are empty


Here is a description how to avoid a problem based on Apple Dev Forum posted before. It works for me so I repost description for those people who don't want to go and register at the forum.

The bug is due to an error in XCode 5 when it deals with the user adding new files or folders to the project.

Xcode is modifying the 'Library Search Paths' build setting, and making a god-awful mess of it.Instead of adding $(SRCROOT)/ it is adding fully rooted paths to all new items, and adding random amounts of /// into other elements of the string.It also seems to be duplicating source paths in some instances, probably because it's broken the existing ones, and thinks they need adding again.

The solution:

  1. Copy out your Library Search Paths string into a text editor.
  2. Remove any fully rooted paths that shouldn't be there, and replace them with the usual $(SRCROOT)/MyFiles/ type paths.
  3. Remove all extraneous slashes and make sure each path has a " character at beginning and end to protect against spaces in filenames.
  4. Paste the edited string back into Build Settings.
  5. Clean, then Build. Should be back to normal.

This error may well recur if you add new files to your project, so beware.


My project.pbxproj looked like this:

LIBRARY_SEARCH_PATHS = (        "$(inherited)",        "\\\"$(SRCROOT)/AdMob-v6.4.1\\\"",        "/MyProject/AdMob-v6.5.1",); 

I closed MyProject, deleted the line containing AdMob-v6.4.1, reopened the project, performed a "validate project settings", cleaned, and built, and now all is well.


Yeah, Xcode is jenky sometimes.

Did you try cleaning your build (Product > Clean Build Folder / Shift-Cmd-K) and trying again?

Another thing you can do is to search for the two entries in [project_name].xcodeproj/project.pbxproj, remove them, close XCode, re-open, Clean Build Folder and try again.

Good luck!