[trunk] use hidden visibility for static library (fixes issue 354)

This commit is contained in:
Matthieu Darbois 2015-01-25 16:59:39 +00:00
parent 7a8cdc4bb0
commit 3ed5858902
1 changed files with 18 additions and 14 deletions

View File

@ -79,7 +79,11 @@ Most compilers implement their own version of this keyword ...
#if defined(OPJ_STATIC) || !defined(_WIN32)
/* http://gcc.gnu.org/wiki/Visibility */
# if __GNUC__ >= 4
# if defined(OPJ_STATIC) /* static library uses "hidden" */
# define OPJ_API __attribute__ ((visibility ("hidden")))
# else
# define OPJ_API __attribute__ ((visibility ("default")))
# endif
# define OPJ_LOCAL __attribute__ ((visibility ("hidden")))
# else
# define OPJ_API