aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lv2/lv2plug.in/ns/lv2core/lv2.h13
-rw-r--r--lv2/lv2plug.in/ns/lv2core/lv2core.doap.ttl2
2 files changed, 13 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
/**
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."
]
]
] , [