如何删除 Xcode 警告 Apple Mach-O 链接器警告“指针未在地址对齐”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/42268117/
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
How to remove the Xcode warning Apple Mach-O Linker Warning 'Pointer not aligned at address
提问by Alexander Huang
I have a slight issue when build my Xcode project, get tones of warning after update pod. It looks like this
我在构建我的 Xcode 项目时遇到了一个小问题,在更新 pod 后收到警告音。看起来像这样
Already search the whole site here but still no luck. it doesn't affect the project but it is quite annoying. Anyone could help?
已经在这里搜索了整个网站,但仍然没有运气。它不会影响项目,但它很烦人。任何人都可以帮忙吗?
采纳答案by tzm41
It probably means their binary file has non-aligned pointer when they compile their code. In those cases the alignment basically defaults to 1 byte and hypothetically might impact performance. After updating to Xcode 8.3 public release I am still seeing this error, so Google might need to compile their static library with different settings to make it go away.
这可能意味着他们的二进制文件在编译代码时具有未对齐的指针。在这些情况下,对齐基本上默认为 1 个字节,并且假设可能会影响性能。更新到 Xcode 8.3 公开版本后,我仍然看到此错误,因此 Google 可能需要使用不同的设置编译他们的静态库以使其消失。
回答by kball
Got this response from firebase support:
从 firebase 支持得到这个回应:
This is a known issue with Xcode 8.3 beta, so it might be a beta thing and Xcode being extra verbose. It works well though with 8.2.1 so I recommend temporarily use it to avoid the warnings or ignore the warnings on 8.3 beta if it does not affect your app.
这是 Xcode 8.3 beta 的一个已知问题,因此它可能是 beta 版本,而 Xcode 更加冗长。虽然它在 8.2.1 上运行良好,所以我建议暂时使用它来避免警告或忽略 8.3 beta 上的警告,如果它不影响您的应用程序。
回答by adbitx
This has been fixed in Firebase 3.16.0 (Firebase Core 3.6 + Firebase Analytics 3.8.0)
这已在 Firebase 3.16.0(Firebase Core 3.6 + Firebase Analytics 3.8.0)中得到修复
回答by Dido
guys, it is all fixed now. Tested it all myself on two projects. You got to go to the correct directory of your project so that your pod spec file is visible to your command line commands, run
伙计们,现在一切都解决了。我自己在两个项目中测试了这一切。您必须转到项目的正确目录,以便您的 pod 规范文件对您的命令行命令可见,运行
pod update
and see it all fixed and working properly!
并看到它全部修复并正常工作!
回答by Jonny
These problems are addressed, and likely fixed, with release 3.16.0.
这些问题在 3.16.0 版中得到解决并可能得到修复。