aboutsummaryrefslogtreecommitdiffstats
path: root/lv2/lv2plug.in/ns/lv2core/lv2.h
diff options
context:
space:
mode:
Diffstat (limited to 'lv2/lv2plug.in/ns/lv2core/lv2.h')
-rw-r--r--lv2/lv2plug.in/ns/lv2core/lv2.h13
1 files changed, 11 insertions, 2 deletions
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
@@ -343,13 +343,22 @@ typedef struct _LV2_Descriptor {
} 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
/**