diff options
Diffstat (limited to 'muse2/synti/fluid')
-rw-r--r-- | muse2/synti/fluid/CMakeLists.txt | 2 | ||||
-rw-r--r-- | muse2/synti/fluid/fluid.cpp | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/muse2/synti/fluid/CMakeLists.txt b/muse2/synti/fluid/CMakeLists.txt index 38184550..0007537f 100644 --- a/muse2/synti/fluid/CMakeLists.txt +++ b/muse2/synti/fluid/CMakeLists.txt @@ -38,7 +38,7 @@ add_library ( fluid SHARED # set_target_properties ( fluid 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" ) target_link_libraries(fluid diff --git a/muse2/synti/fluid/fluid.cpp b/muse2/synti/fluid/fluid.cpp index a03be4de..13cfbef3 100644 --- a/muse2/synti/fluid/fluid.cpp +++ b/muse2/synti/fluid/fluid.cpp @@ -61,6 +61,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; } } |