summaryrefslogtreecommitdiff
path: root/muse2/synti/organ
diff options
context:
space:
mode:
Diffstat (limited to 'muse2/synti/organ')
-rw-r--r--muse2/synti/organ/CMakeLists.txt2
-rw-r--r--muse2/synti/organ/organ.cpp7
2 files changed, 7 insertions, 2 deletions
diff --git a/muse2/synti/organ/CMakeLists.txt b/muse2/synti/organ/CMakeLists.txt
index 8dd67aa8..40db20c1 100644
--- a/muse2/synti/organ/CMakeLists.txt
+++ b/muse2/synti/organ/CMakeLists.txt
@@ -40,7 +40,7 @@ add_library ( organ SHARED
#
set_target_properties ( organ
PROPERTIES PREFIX ""
- COMPILE_FLAGS "-O2 -include ${PROJECT_BINARY_DIR}/all-pic.h"
+ COMPILE_FLAGS "-fvisibility=hidden -O2 -include ${PROJECT_BINARY_DIR}/all-pic.h"
)
target_link_libraries(organ
diff --git a/muse2/synti/organ/organ.cpp b/muse2/synti/organ/organ.cpp
index a1788a6c..2dede8de 100644
--- a/muse2/synti/organ/organ.cpp
+++ b/muse2/synti/organ/organ.cpp
@@ -704,7 +704,12 @@ extern "C" {
MESS_MAJOR_VERSION, MESS_MINOR_VERSION,
instantiate,
};
-
+ // We must compile with -fvisibility=hidden to avoid namespace
+ // conflicts with global variables.
+ // Only visible symbol is "mess_descriptor".
+ // (TODO: all plugins should be compiled this way)
+
+ __attribute__ ((visibility("default")))
const MESS* mess_descriptor() { return &descriptor; }
}