‘ld: warning: directory not found for option’

My problem was that I opened the original .xcodeproj instead of the .xcworkspace that was generated by CocoaPods.


You need to do this:

  1. Click on your project (targets)
  2. Click on Build Settings
  • if your error includes the -L flag, then delete the values in Library Search Paths
  • if your error includes the -F flag, then delete the values in Framework Search Paths

And regarding the second error, sorry i can't help you out with that one. Hope someone else can help you out.


There are two errors that people seem to be confusing.

If it is a "directory not found for option '-L/..." error, that means it's a Library Error, and you should try to:

  • Click on your project (targets)
  • Click on Build Settings
  • Under Library Search Paths, delete the paths

If it is a "directory not found for option '-F/...", that means it's a Framework Error, and you should try to:

  • Click on your project (targets)
  • Click on Build Settings
  • Under Framework Search Paths, delete the paths

This might happen when you move the referenced file around.

Tags:

Xcode