Ahh, much better way to stay resident, use -Wl,-znodelete in link

This commit is contained in:
Nick Lanham 2012-02-23 13:11:20 +01:00
parent 9b90186994
commit aa62651ab3
2 changed files with 4 additions and 8 deletions

View File

@ -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)

View File

@ -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,