我一直在为我的 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/