We could define the <lib>_SHRSYM macros to __attribute__ ((visibility ("default"))) for GCC and Clang. We could also define a <lib>_PRIV_SYM macro which is defined to __attribute__((__visibility__("hidden"))) on both Clang and GCC.
Then we could add -fvisibility=hidden to Clang and GCC to hide symbols by default, like for Windows.
We could define the
<lib>_SHRSYM
macros to__attribute__ ((visibility ("default")))
for GCC and Clang. We could also define a<lib>_PRIV_SYM
macro which is defined to__attribute__((__visibility__("hidden")))
on both Clang and GCC.Then we could add
-fvisibility=hidden
to Clang and GCC to hide symbols by default, like for Windows.