diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2019-02-13 17:36:22 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2020-11-20 11:04:00 +0800 |
commit | 4ecff75743751799147fb104c20b0e33e3086208 (patch) | |
tree | f92bb74b501d98dd6a24f6d6dc4a4566fe77c402 | |
parent | 0e67927a50f23c9cc3715ad1796dbfb851146ea1 (diff) | |
download | cogl.windows.fixes.tar.gz |
cogl/cogl-debug.h: Export and properly use _cogl_debug_instancescogl.windows.fixes
We need to also export the extern variables _cogl_debug_instances its
consumption in Cogl-Path, so that it can be properly referred to by
Cogl-Path and hence any other libraries that make use of them, such as
Clutter.
On Visual Studio DLL builds, this *must* also be marked with
__declspec(dllimport) when Cogl-Path is being built against Cogl so that
it can be referred to properly, otherwise one will be subject to crashes
as a result.
-rw-r--r-- | cogl/cogl-debug.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cogl/cogl-debug.h b/cogl/cogl-debug.h index 91a49e16..f59f3c87 100644 --- a/cogl/cogl-debug.h +++ b/cogl/cogl-debug.h @@ -79,12 +79,13 @@ typedef enum { COGL_DEBUG_N_FLAGS } CoglDebugFlags; -extern GHashTable *_cogl_debug_instances; +/* _cogl_debug_flags and _cogl_debug_instances currently needs to exported + * outside of the shared library for cogl-pango and cogl-path. The special + * COGL_EXPORT macro is needed to get this to work when building with MSVC. + */ +COGL_EXPORT extern GHashTable *_cogl_debug_instances; #define COGL_DEBUG_N_LONGS COGL_FLAGS_N_LONGS_FOR_SIZE (COGL_DEBUG_N_FLAGS) -/* _cogl_debug_flags currently needs to exported outside of the shared - library for cogl-pango. The special COGL_EXPORT macro is needed to - get this to work when building with MSVC */ COGL_EXPORT extern unsigned long _cogl_debug_flags[COGL_DEBUG_N_LONGS]; #define COGL_DEBUG_ENABLED(flag) \ |