On Linux, when building OTIO 0.18.1 with OTIO_SHARED_LIBS, gcc 14 in C++ 20 mode, you get the following warning for almost every C++ file:
src/opentime/timeRange.h:19:31: warning: 'visibility' attribute ignored [-Wattributes]
19 | OPENTIME_API constexpr double DEFAULT_EPSILON_s = 1.0 / (2 * 192000.0);
The definition of DEFAULT_EPSILON is:
OPENTIME_API constexpr double DEFAULT_EPSILON_s = 1.0 / (2 * 192000.0);
and when OPENTIME_EXPORT is defined, in src/opentime/export.h:
...
#elif defined(__GNUC__) && __GNUC__ >= 4 || defined(__clang__)
# define OPENTIMELINEIO_EXPORT __attribute__((visibility("default")))
...
define OPENTIME_API OPENTIMELINEIO_EXPORT
I believe const objects automatically have internal linkage unless you make them extern, so the visibility attribute does not apply to DEFAULT_EPSILON, hence the warning.