From a8e7ea7fb026d5d3e0a037f5ced8010187541a41 Mon Sep 17 00:00:00 2001 From: Matthew Woehlke Date: Tue, 9 Aug 2016 13:16:26 -0400 Subject: [PATCH] Set ELF visibility Set symbol visibility to "default" on non-Windows platforms. This allows building with -fvisibility=hidden, which has various advantages, and which some projects will almost certainly want to do. --- tinyxml2.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tinyxml2.h b/tinyxml2.h index fb4376d..2dc98d3 100755 --- a/tinyxml2.h +++ b/tinyxml2.h @@ -72,6 +72,8 @@ distribution. # else # define TINYXML2_LIB # endif +#elif __GNUC__ >= 4 +# define TINYXML2_LIB __attribute__((visibility("default"))) #else # define TINYXML2_LIB #endif