Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'warning: directory not found for option' error on build

All of a sudden my app has started giving me an error when I try to build it. This is the error I'm getting:

ld: warning: directory not found for option '-L/Users/user/Documents/Developer/Alton-Towers-Times/build/Debug-iphoneos' ld: file too small (length=0) file '/Users/user/Library/Developer/Xcode/DerivedData/Mouse_Times_Florida-eqhrhnbxmmkxtahdghmnvehbzbgt/Build/Intermediates/Mouse Times Florida.build/Debug-iphonesimulator/Mouse Times Florida WatchKit Extension.build/Objects-normal/x86_64/SecondInterfaceController.o' for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Only thing I've really done since I last managed to get it to run was changing the bundle IDs and I also changed the app name. I've tried a few things including deleting the derived data, but nothing seems to have helped.

Anyone have any ideas?

like image 437
user3746428 Avatar asked Aug 16 '15 21:08

user3746428


2 Answers

I solved this warning removing the following setting: "$(SDKROOT)/Developer/Library/Frameworks"

This options is located in Settings -> Build Settings -> Search Paths -> Framework Search Paths

Setting location

My project continues compiling and working fine, after removing this option.

like image 61
veladan Avatar answered Nov 10 '22 05:11

veladan


Veladan answer helped me to sort out that issue on an iOS8 project freshly migrated to iOS9. This worked fine on the main target of my project, but the warning lasted on the unit tests target, so in the end I edited directly the project.pbxproj file and modified the entries :

FRAMEWORK_SEARCH_PATHS = (
    "$(SDKROOT)/Developer/Library/Frameworks",
    "$(inherited)",
);

to :

FRAMEWORK_SEARCH_PATHS = "";
like image 43
FredericK Avatar answered Nov 10 '22 04:11

FredericK