简体   繁体   English

Apple Mach-O链接器警告“找不到选项的目录......”

[英]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. 感谢您的时间和帮助。

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: 这是我打开项目的构建设置时的样子:

打开构建设置

Click on "Framework Search Paths" and you should find the bogus paths listed in there, which you can delete. 单击“框架搜索路径”,您应该找到其中列出的伪造路径,您可以删除它们。

I sat on this issue for like more than a week before figuring out. 我在这个问题上坐了一个多星期才搞清楚。 For me the issue was a missing pod reference. 对我来说,问题是缺少pod参考。 And the error it was showing in xcode was weird. 它在xcode中显示的错误很奇怪。 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. 最后,我做了一个猜测,并将Google分析窗格添加到测试目标和主要应用程序目标,然后开始工作。 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. 所以这就是你想要编译的目标中缺少一​​个pod。 Hope this helps. 希望这可以帮助。

未找到GGL分析窗格

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM