1

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.

これらのリンカー警告を取り除くにはどうすればよいですか? 抑圧以外の方法はありますか?

ありがとう

4

1 に答える 1

2

xcodeビルド設定で「デフォルトで非表示のシンボル」を「YES」に、「インラインメソッドの非表示」を「YES」に変更することで、これらのリンカー警告を取り除きました。

iOS のブースト ライブラリは -fvisibility=hidden -fvisibility-inlines-hidden フラグを使用してビルドされ、xcode ビルド設定ではシンボルの可視性が YES に設定されていました。したがって、不一致とリンカの警告がありました。

于 2015-07-30T20:24:31.660 に答える