From aa62651ab39c7b292f3516ab386a04ddd8844a61 Mon Sep 17 00:00:00 2001 From: Nick Lanham Date: Thu, 23 Feb 2012 13:11:20 +0100 Subject: [PATCH] Ahh, much better way to stay resident, use -Wl,-znodelete in link --- CMakeLists.txt | 4 ++++ nknob.c | 8 -------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2a229aa..26af234 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,10 @@ add_library(drmr_ui SHARED set_target_properties(drmr PROPERTIES PREFIX "") set_target_properties(drmr_ui PROPERTIES PREFIX "") +set_target_properties(drmr_ui + PROPERTIES + LINK_FLAGS "-Wl,-znodelete" +) target_link_libraries(drmr ${LV2_LIBRARIES} ${SNDFILE_LIBRARIES} ${SAMPLERATE_LIBRARIES} ${EXPAT_LIBRARIES} m) target_link_libraries(drmr_ui ${LV2_LIBRARIES} ${GTK2_LIBRARIES} ${SNDFILE_LIBRARIES} ${SAMPLERATE_LIBRARIES} ${EXPAT_LIBRARIES} m) diff --git a/nknob.c b/nknob.c index 2240993..41c8ff1 100644 --- a/nknob.c +++ b/nknob.c @@ -96,14 +96,6 @@ GType n_knob_get_type (void) { static GType nknob_type; if (!nknob_type) { - // We need to make ourselves memory resident so our type won't get unloaded - // when the window is shown/hiddent - GModule *module_self = g_module_open (INSTALL_DIR"/drmr.lv2/drmr_ui.so", 0); - if (!module_self) - g_print ("error (segfault eminent): %s\n", g_module_error ()); - else - g_module_make_resident(module_self); - static const GTypeInfo object_info = { sizeof (NKnobClass), (GBaseInitFunc) NULL,