簡體   English   中英

xcode 6.4中的鏈接器警告

[英]Linker warnings in xcode 6.4

我為我的ios應用程序使用c ++庫項目(使用boost 1.57庫),並且在構建應用程序時收到數百個鏈接器警告。 該應用程序運行完全正常。

突出的警告是

ld: warning: direct access in boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_exception_>() to global weak symbol boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_exception_>()::ep means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.

我如何擺脫這些鏈接器警告? 除了抑制之外還有其他可能的方法嗎?

謝謝

通過在xcode構建設置中將“默認情況下隱藏的符號”更改為“是”,並將“隱藏的內聯方法”更改為“是”,我擺脫了這些鏈接器警告。

iOS的boost庫是使用-fvisibility = hidden -fvisibility-inlines-hidden標志構建的,並且xcode構建設置的符號可見性設置為YES。 因此,存在不匹配和鏈接器警告。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM