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

2

64

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.

Excruciate answered 5/1, 2015 at 1:5 Comment(0)
M
149

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.

Modie answered 5/1, 2015 at 1:9 Comment(2)
Yeah check the project settings and target settings. The target settings override the project settings.Mime
I could only fix my issue after removing the existing values from the Library Search Path leaving only $(inherited) there.Astomatous
K
6

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

Kitchenette answered 18/6, 2016 at 7:2 Comment(1)
Hey. how did you exactly add the pod in both targets?Viosterol

© 2022 - 2024 — McMap. All rights reserved.