问题描述
我一直在为我的 iPhone Xcode 项目使用以下链接中的 boost 框架:https://goodliffe.blogspot.com/2010/09/building-boost-framework-for-ios-iphone.html
I have been using a boost framework from the link below for my iPhone Xcode project: https://goodliffe.blogspot.com/2010/09/building-boost-framework-for-ios-iphone.html
它工作正常,但我总是收到数百个 Apple Mach-O Linker(id) 警告,例如:
it works fine but I always get hundreds of Apple Mach-O Linker(id) Warnings like:
在 __ZN5boost15program_options6detail7cmdline24handle_additional_parserERSt6vectorISsSaISsEE 中直接访问全局弱符号 __ZTVN5boost17bad_function_callE 意味着不能在运行时覆盖弱符号.这可能是由于使用不同的可见性设置编译不同的翻译单元所致.
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.
如何去掉代码中的那些警告?
How to get rid of those warnings in code?
通过设置默认隐藏符号 = YES,我设法摆脱了大部分警告,但还有3个不会消失,谁能告诉我为什么?
edited: By set Symbols Hidden by Default = YES, I managed to get rid of most of the warnings but there are 3 more left which won't go away, can anyone tell me why?
再次重建后,剩余的 3 个警告也消失了!所以我的解决方案确实有效!
edited again: After a rebuild the remaining 3 warning are gone as well! So my solution did work!
推荐答案
Doe 刚刚想出了如何摆脱数百个这样的警告:为整个目标或项目设置默认隐藏符号构建设置为YES
Doe just figured how to get rid of hundreds of warning like this : set for an entire target or project with the Symbols Hidden by Default build setting to YES
这篇关于xcode with boost:linker(Id) 关于可见性设置的警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!