Reputation: 2207
I'm getting these messages:
ld: warning: directory not found for option '-F"/Users/joel/Development/GHaikuTabbed"'
ld: warning: directory not found for option '-F"/Users/joel/Development/GHaikuTabbed/../../../Downloads"'
But when I go to Build Settings (as suggested at ‘ld: warning: directory not found for option’), Library Search Path and Framework Search Path are empty, so there's nothing to delete.
Thoughts on other things I can do to get rid of this warning?
Upvotes: 34
Views: 28141
Reputation: 3718
To summarise what @user2963906 is suggest, I show my solution to this problem, which I think much easy.
I assume that you have all your files and libraries in your project folder.
$(SRCROOT)/"Your App Name"
non-recursive
to recursive
Upvotes: 4
Reputation: 599
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!
Upvotes: 4
Reputation: 2005
I had to escape any spaces with a \
So for example:
/Users/Me/Folder\ with\ spaces\(and\ brackets\)
in Library Search Paths
Upvotes: 1
Reputation: 181
In project folder -> target , under 'Build Setting' search 'library search paths' and simply delete previous path in Debug & Release area.
Now add the line below line using + symbol
$(PROJECT_DIR)/Library
Note: After adding the above line click out from popup. its automatically display the full path.Then check this path with your Finder if any correction add after the $(PROJECT_DIR)/
Clean , Build and Run … Simple its cleared that error. :)
-Anup
Upvotes: 0
Reputation: 285
I faced the same problem but was unable to fix it as per the steps since no library folders were getting displayed in the Project properties window.
So I solved it in another way (you need to be able to use the Terminal and the VIM editor. Also take a backup of the project just in case)
Open the project in XCode and build. Works like a charm.
Upvotes: 1
Reputation: 1597
Easy Solution :
It's work for me
when you want to add new files or folders to the project through xcode 5 and above error display.Just follow below simple step.(Please don't forgot to get backup of your project).
Upvotes: 1
Reputation: 21005
This worked for me :
Create this real directories (with no content), add them to project, remove via remove reference, clean, delete for real
Upvotes: 0
Reputation: 616
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:
This error may well recur if you add new files to your project, so beware.
Upvotes: 60
Reputation: 9933
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.
Upvotes: 5
Reputation: 13057
I found a solution for this with my case on the iOS Developer Forums. It happened to me with Xcode 5. See Massive Linker Error Warnings (directory not found for option) yet . For me it was caused by Xcode 5 junking up the "Library Search Paths" build setting.
Upvotes: 2