From 61ee1b13fdc6e29d9f9cf33e4ea133e2cd5e4368 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 18 Jan 2015 12:35:58 -0500 Subject: Add extern/visibility to LV2_SYMBOL_EXPORT. --- lv2/lv2plug.in/ns/lv2core/lv2.h | 13 +++++++++++-- lv2/lv2plug.in/ns/lv2core/lv2core.doap.ttl | 2 ++ 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'lv2/lv2plug.in/ns/lv2core') diff --git a/lv2/lv2plug.in/ns/lv2core/lv2.h b/lv2/lv2plug.in/ns/lv2core/lv2.h index b2688c4..1d4da99 100644 --- a/lv2/lv2plug.in/ns/lv2core/lv2.h +++ b/lv2/lv2plug.in/ns/lv2core/lv2.h @@ -342,14 +342,23 @@ typedef struct _LV2_Descriptor { const void * (*extension_data)(const char * uri); } LV2_Descriptor; +/** + Helper macro needed for LV2_SYMBOL_EXPORT when using C++. +*/ +#ifdef __cplusplus +# define LV2_SYMBOL_EXTERN extern "C" +#else +# define LV2_SYMBOL_EXTERN +#endif + /** Put this (LV2_SYMBOL_EXPORT) before any functions that are to be loaded by the host as a symbol from the dynamic library. */ #ifdef _WIN32 -# define LV2_SYMBOL_EXPORT __declspec(dllexport) +# define LV2_SYMBOL_EXPORT LV2_SYMBOL_EXTERN __declspec(dllexport) #else -# define LV2_SYMBOL_EXPORT +# define LV2_SYMBOL_EXPORT LV2_SYMBOL_EXTERN __attribute__((visibility("default"))) #endif /** diff --git a/lv2/lv2plug.in/ns/lv2core/lv2core.doap.ttl b/lv2/lv2plug.in/ns/lv2core/lv2core.doap.ttl index b9462c5..60c231e 100644 --- a/lv2/lv2plug.in/ns/lv2core/lv2core.doap.ttl +++ b/lv2/lv2plug.in/ns/lv2core/lv2core.doap.ttl @@ -22,6 +22,8 @@ dcs:changeset [ dcs:item [ rdfs:label "Relax domain of lv2:minimum lv2:maximum and lv2:default so they can be used to describe properties/parameters as well." + ] , [ + rdfs:label "Add extern C and visibility attribute to LV2_SYMBOL_EXPORT." ] ] ] , [ -- cgit v1.2.1