summaryrefslogtreecommitdiff
path: root/src/lib/openjp3d/openjp3d.h
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2012-10-15 09:44:34 +0000
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2012-10-15 09:44:34 +0000
commitdff377a741ec87f8737002cf112ae12655881777 (patch)
tree24fec645259014dc1e60f393d5d39c2b36aa603c /src/lib/openjp3d/openjp3d.h
parentb24cf8d1574c00915c568314d3e0e011ca77ba89 (diff)
[trunk] Fix compilation:
- using mingw32 compiler (missing exported symbols) - using -fvisibility=hidden (gcc on UNIX)
Diffstat (limited to 'src/lib/openjp3d/openjp3d.h')
-rwxr-xr-xsrc/lib/openjp3d/openjp3d.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/openjp3d/openjp3d.h b/src/lib/openjp3d/openjp3d.h
index e6829d91..d7ac42da 100755
--- a/src/lib/openjp3d/openjp3d.h
+++ b/src/lib/openjp3d/openjp3d.h
@@ -38,10 +38,18 @@
*/
#if defined(OPJ_STATIC) || !defined(_WIN32)
+/* http://gcc.gnu.org/wiki/Visibility */
+#if __GNUC__ >= 4
+#define OPJ_API __attribute__ ((visibility ("default")))
+#define OPJ_LOCAL __attribute__ ((visibility ("hidden")))
+#else
#define OPJ_API
+#define OPJ_LOCAL
+#endif
#define OPJ_CALLCONV
#else
#define OPJ_CALLCONV __stdcall
+
/*
The following ifdef block is the standard way of creating macros which make exporting
from a DLL simpler. All files within this DLL are compiled with the OPJ_EXPORTS