c++ - 带有 boost : linker(Id) Warning about visibility settings 的 xcode

标签 c++ xcode boost warnings

我一直在为我的 iPhone Xcode 项目使用下面链接中的 boost 框架: https://goodliffe.blogspot.com/2010/09/building-boost-framework-for-ios-iphone.html

它工作正常,但我总是收到数百个 Apple Mach-O Linker(id) 警告,例如:

Direct access in __ZN5boost15program_options6detail7cmdline24handle_additional_parserERSt6vectorISsSaISsEE to global weak symbol __ZTVN5boost17bad_function_callE means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.

如何摆脱代码中的这些警告?

编辑: 通过设置 Symbols Hidden by Default = YES,我设法消除了大部分警告,但还有 3 个警告不会消失,谁能告诉我为什么?

再次编辑: 重建后,剩余的 3 个警告也消失了!所以我的解决方案确实奏效了!

最佳答案

如果 boost 被多个项目包含,每个项目的值必须相同

 Symbols Hidden by Default
 Inline Methods Hidden

关于c++ - 带有 boost : linker(Id) Warning about visibility settings 的 xcode,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8685045/

相关文章:

c++ - g++ 5.2 - 使用整数文字调用模板参数包时未初始化警告

ios - Arc 语义问题 : No known class method for selector (method name here)

c++ - 尝试将 gzip 中的文件提取到 C++ 中的临时文件夹

ios - 使用 TabBar 问题限制底部布局指南

c++ - 如何在异构容器上使用 boost::fusion::transform?

c++ - boost::python 传递 python::list 的引用

c++ - glutPostRedisplay() 可能只重绘某些对象吗?

c++ - 压缩 `std::tuple` 和可变参数

c++ - 我应该在 `#include` 中添加 `main(){}` 语句吗?

iOS 应用程序 : Missing 64-bit support