diff options
author | Neil Roberts <neil@linux.intel.com> | 2011-11-24 16:09:16 +0000 |
---|---|---|
committer | Neil Roberts <neil@linux.intel.com> | 2011-11-25 13:14:10 +0000 |
commit | d44e548715da619364d4f82e26e83957af38701d (patch) | |
tree | 54d886d6a2407de3797611f626dc1218faecef71 /cogl/cogl-util.h | |
parent | 2055f6ba91d192073eaa0dbacf43bbdc160baec8 (diff) | |
download | cogl-d44e548715da619364d4f82e26e83957af38701d.tar.gz |
cogl-debug: Mark _cogl_debug_flags with dllexport for MSVC
When building with MSVC, symbols to be exported that point to data
need to be marked with dllimport to be successfully imported. The
_cogl_debug_flags variable is currently exported because it is used
from cogl-pango. This patch adds a COGL_EXPORT macro to cogl-util.h
which is used in cogl-debug.h
Based on a patch by Chun-wei Fan
https://bugzilla.gnome.org/show_bug.cgi?id=650020
Reviewed-by: Robert Bragg <robert@linux.intel.com>
Diffstat (limited to 'cogl/cogl-util.h')
-rw-r--r-- | cogl/cogl-util.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/cogl/cogl-util.h b/cogl/cogl-util.h index 256ecaea..04e59d02 100644 --- a/cogl/cogl-util.h +++ b/cogl/cogl-util.h @@ -32,6 +32,19 @@ #include <stdio.h> #endif +/* When compiling with Visual Studio, symbols that represent data that + are exported out of the DLL need to be marked with the dllexport + attribute. */ +#ifdef _MSC_VER +#ifdef COGL_BUILD_EXP +#define COGL_EXPORT __declspec(dllexport) +#else +#define COGL_EXPORT __declspec(dllimport) +#endif +#else +#define COGL_EXPORT +#endif + int _cogl_util_next_p2 (int a); |