2 Feb
2021
2 Feb
'21
2:09 p.m.
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. 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.