summaryrefslogtreecommitdiff
path: root/muse2/synti/fluidsynth
diff options
context:
space:
mode:
Diffstat (limited to 'muse2/synti/fluidsynth')
-rw-r--r--muse2/synti/fluidsynth/CMakeLists.txt2
-rw-r--r--muse2/synti/fluidsynth/fluidsynti.cpp6
2 files changed, 7 insertions, 1 deletions
diff --git a/muse2/synti/fluidsynth/CMakeLists.txt b/muse2/synti/fluidsynth/CMakeLists.txt
index cdb298e2..0c3e1b97 100644
--- a/muse2/synti/fluidsynth/CMakeLists.txt
+++ b/muse2/synti/fluidsynth/CMakeLists.txt
@@ -38,7 +38,7 @@ add_library ( fluidsynth SHARED
#
set_target_properties ( fluidsynth
PROPERTIES PREFIX ""
- COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all-pic.h"
+ COMPILE_FLAGS "-fvisibility=hidden -include ${PROJECT_BINARY_DIR}/all-pic.h"
LINK_FLAGS "${FLUIDSYN_LDFLAGS}" # "-lfluidsynth"
)
diff --git a/muse2/synti/fluidsynth/fluidsynti.cpp b/muse2/synti/fluidsynth/fluidsynti.cpp
index bf27a61c..bf12b7f8 100644
--- a/muse2/synti/fluidsynth/fluidsynti.cpp
+++ b/muse2/synti/fluidsynth/fluidsynti.cpp
@@ -1310,6 +1310,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; }
}