ios Apple Mach-O 链接器警告“找不到选项的目录...”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/27772151/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Apple Mach-O Linker Warning "Directory Not Found For Option..."
提问by Gavin
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.
显然,由于逻辑板问题,我现在正在使用不同的目录,因为我的驱动器多次重新格式化,我只想知道我可以摆脱这些错误的最方便的方法。感谢您的时间和帮助。
回答by Michael Dautermann
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.
单击“框架搜索路径”,您应该会找到其中列出的虚假路径,您可以将其删除。
回答by Arjun Kalidas
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.
我在这个问题上坐了一个多星期才弄清楚。对我来说,问题是缺少 pod 参考。它在 xcode 中显示的错误很奇怪。当我说奇怪时,他们不会告诉您究竟缺少什么或错误。请看下图:? 问题与测试目标有关。尝试所有框架搜索路径和库搜索路径也将它们从项目中重置或删除,我已经筋疲力尽了。没有任何效果。
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.
最后我做了一个猜测并将 Google 分析 pod 添加到测试目标和主应用程序目标,然后砰..它开始工作了。疯狂的!!!如果您看到图像中的错误,则表示与架构有关。我什至玩弄架构设置。
So it's all about a pod missing in the target that you are trying to compile. Hope this helps.
因此,这完全是关于您尝试编译的目标中缺少一个 pod。希望这可以帮助。