diff --git a/bindings/c/tag_c.h b/bindings/c/tag_c.h index 055da4e3..cb109275 100644 --- a/bindings/c/tag_c.h +++ b/bindings/c/tag_c.h @@ -35,6 +35,8 @@ extern "C" { #else #define TAGLIB_C_EXPORT __declspec(dllimport) #endif +#elif defined(__GNUC__) && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 1) +#define TAGLIB_C_EXPORT __attribute__ ((visibility("default"))) #else #define TAGLIB_C_EXPORT #endif diff --git a/taglib/taglib_export.h b/taglib/taglib_export.h index a6894d48..f1345e94 100644 --- a/taglib/taglib_export.h +++ b/taglib/taglib_export.h @@ -32,6 +32,8 @@ #else #define TAGLIB_EXPORT __declspec(dllimport) #endif +#elif defined(__GNUC__) && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 1) +#define TAGLIB_EXPORT __attribute__ ((visibility("default"))) #else #define TAGLIB_EXPORT #endif