diff options
| author | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2012-10-15 09:44:34 +0000 |
|---|---|---|
| committer | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2012-10-15 09:44:34 +0000 |
| commit | dff377a741ec87f8737002cf112ae12655881777 (patch) | |
| tree | 24fec645259014dc1e60f393d5d39c2b36aa603c /src/lib/openmj2/openjpeg.h | |
| parent | b24cf8d1574c00915c568314d3e0e011ca77ba89 (diff) | |
[trunk] Fix compilation:
- using mingw32 compiler (missing exported symbols)
- using -fvisibility=hidden (gcc on UNIX)
Diffstat (limited to 'src/lib/openmj2/openjpeg.h')
| -rw-r--r-- | src/lib/openmj2/openjpeg.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/openmj2/openjpeg.h b/src/lib/openmj2/openjpeg.h index d77df6ca..defed5a3 100644 --- a/src/lib/openmj2/openjpeg.h +++ b/src/lib/openmj2/openjpeg.h @@ -33,7 +33,6 @@ #ifndef OPENJPEG_H #define OPENJPEG_H - /* ========================================================== Compiler directives @@ -41,7 +40,14 @@ */ #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 |
