Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apple Mach-O Linker Warning "Directory Not Found For Option..."

I simply want to rid of the warnings that pop up like these:

ld: warning: directory not found for option '-F/Users/m/Desktop/FacebookSDK'
ld: warning: directory not found for option '-F/Users/m/Desktop/FacebookSDK/FBAudienceNetwork'
ld: warning: directory not found for option '-F/Users/gavin/Downloads/shaffiulla11-bat-b86d81d8adc6'
ld: warning: directory not found for option '-F/Users/gavin/Desktop/shaffiulla11-bat-b86d81d8adc6'
ld: warning: ignoring file /Users/Gavin/Desktop/FacebookSDK/Bolts.framework/Bolts, missing required architecture x86_64 in file /Users/Gavin/Desktop/FacebookSDK/Bolts.framework/Bolts (2 slices)

Obviously I am using different directories now because of multiple reformats of my drive because of Logic Board issues and just would like to know the most convenient way I can get rid of these errors. Thanks for the time and help.

like image 462
Gavin Avatar asked Jan 05 '15 01:01

Gavin


2 Answers

I sat on this issue for like more than a week before figuring out. For me the issue was a missing pod reference. And the error it was showing in xcode was weird. When I say weird they don't tell you what exactly is missing or the error. See the image below: And the issue was around the test target. I was exhausted trying out all the Framework search paths and Library Search Paths reset or removing them from the project as well. Nothing worked.

And finally I did a guess and added the Google analytics pod to both test target and main app target and bang..it started working. Crazy!!! The error here in the image if you see denotes something to do with architecture. I even played around with the architecture settings.

So it's all about a pod missing in the target that you are trying to compile. Hope this helps.

GGL analytics pod was not found

like image 34
Arjun Kalidas Avatar answered Nov 14 '22 06:11

Arjun Kalidas


Go into your Projects settings and remove the excess Frameworks paths in there that you don't need.

Here's what it looks like when I open my project's build settings:

Open Build Settings

Click on "Framework Search Paths" and you should find the bogus paths listed in there, which you can delete.

like image 108
Michael Dautermann Avatar answered Nov 14 '22 05:11

Michael Dautermann