Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode linker Directory not found for option

Tags:

xcode

xcode4

Xcode 4 is throwing me a warning about directory not found for option '-L/Users/t2wu/Documents/blah blah'. Yes it shouldn't be found because I removed it. I remove the directory and I also removed the directory setting in both the target and the project library search path. I also remove the .a file which I was linking before from the "Link binaries with Libraries". It compiles fine, it just gives me the warning. Why is it still having the -L flag?

like image 909
huggie Avatar asked Apr 03 '12 04:04

huggie


4 Answers

Check the Build settings tab and make sure that the "Library search paths" option is empty.

At last resort, fire up Terminal and cd to the app project directory (appname.xcodeproj) and do a fgrep for the erroneous search path. I've found some of these lurking in the project.pbxproj file; ended up editing the file manually to get rid of them. (Of course you should make a copy of the file before doing so, in case you trash the project file.)

It'd also be worthwhile to do a "clean" on the project. How to Empty Caches and Clean All Targets Xcode 4.

like image 161
jkira Avatar answered Oct 24 '22 13:10

jkira


I had the same issue in my project, it contains multiple custom framework created by me and the project. My issue is resolved by removing 'Framework search Paths' and 'Library Search Paths' from the target which has this issue.

like image 23
Anni S Avatar answered Oct 24 '22 13:10

Anni S


In my case in targets -> build settings I removed searchpaths for which errors occured. Then removed libraries from project and added them again.

like image 34
Nikolay Shubenkov Avatar answered Oct 24 '22 13:10

Nikolay Shubenkov


You may need to clear the Search Paths for the Tests target as well as the main project. This had me stumped for a little while.

like image 35
robert Avatar answered Oct 24 '22 14:10

robert