I\'m getting this error for my profile build (debug build was OK).
{Directory not found for option \'-L../../../Mac/Profile/lib [full path of that directory]
There are two errors that people seem to have confused
If it is a "directory not found for option '-L/..." That means it's a Library Error, and you might want to try:
If it is a "directory not found for option '-F/..." That means it's a Framework Error, and you might want to try:
Framework Search Paths
, delete the pathsThis might happen when you move referenced files around or change the project folder name.
I came across this error in seemingly a completely different scenario from those answers above. Hopefully some people will do what I did and find this useful even if it is a rare occurence.
I managed to get this error after having just added a new viewController to my project. As normal I added a tableview and constrained it then added and linked the delegate and datasource. I also created a property.
The weird thing that I then noticed was that as soon as I finished creating the property it was immediately linked, as if I had linked it, but before I linked it. When I clicked on the xib file and checked the links it wasn't in fact linked to the table view.
(This link appeared automatically without me needing to create it myself)
I don't know why this happened. I deleted the file and remade it with the same name but it just happened again. Giving me this error above.
The way I solved it was to create a new file, different name, and added and created the links in a different order checking at each step that this hadn't occurred. After doing this no linked created themselves and it worked.
TL DR: If you are getting this error and have recently added new view controller then check if deleting it works and if so they remake it being careful about any automatic links.
It was similar as above in the Library Search Paths. I found that one of my paths was missing quotes around it...
// Old path
$(PROJECT_DIR)/Google Analytics
// New path
"$(PROJECT_DIR)/Google Analytics"
Go to "Get Info" on the target. Click the "Build Settings" tab (i'm using Xcode4), and scroll down to "Search Paths", Where You delete all the values in "Library Search Paths".
Hope that helps...