On 2/2/21 5:09 PM, Peter Dimov via Boost wrote:
Andrey Semashev wrote:
So, the bottom line, BOOST_PROGRAM_OPTIONS_DECL must be defined to:
- BOOST_SYMBOL_EXPORT - on Windows, when the library is being built; - BOOST_SYMBOL_IMPORT - on Windows, when the library is being consumed by user; - BOOST_SYMBOL_VISIBLE - in any other case.
BOOST_SYMBOL_EXPORT is defined to BOOST_SYMBOL_VISIBLE on non-Windows in order to make the third case unnecessary.
Oh, ok.
Alexander suggests that on macOS (but not Linux), it's also necessary to define BOOST_SYMBOL_IMPORT to BOOST_SYMBOL_VISIBLE (instead of to nothing) on non-Windows. This seems sensible.
In other words,
- BOOST_SYMBOL_EXPORT - when the library is being built; - BOOST_SYMBOL_IMPORT - when the library is being consumed by user.
Ok.