Opened 10 years ago
Last modified 10 years ago
#6998 new Bugs
visibility problems on Mac OS X / GCC
Reported by: | Mathias Gaunard | Owned by: | Vladimir Prus |
---|---|---|---|
Milestone: | To Be Determined | Component: | program_options |
Version: | Boost 1.49.0 | Severity: | Problem |
Keywords: | visibility gcc mac | Cc: |
Description (last modified by )
When an application built with -fvisibility=hidden is linked against libboost_program_options.dylib (built with default visibility), the linker emits the following warning:
ld: warning: direct access in __static_initialization_and_destruction_0(int, int) to global weak symbol boost::program_options::options_description::~options_description() means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
Even if the two are built with different visibility settings the program_options headers should force whatever needs to be visible to be.