diff --git a/Lib/linkruntime.c b/Lib/linkruntime.c index 1d4f80cf6..ddc781207 100644 --- a/Lib/linkruntime.c +++ b/Lib/linkruntime.c @@ -1,3 +1,4 @@ +#ifndef SWIGEXPORT # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # if defined(STATIC_LINKED) # define SWIGEXPORT @@ -5,6 +6,13 @@ # define SWIGEXPORT __declspec(dllexport) # endif # else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif static void *ptr = 0; SWIGEXPORT void *