Ahh, much better way to stay resident, use -Wl,-znodelete in link
This commit is contained in:
parent
9b90186994
commit
aa62651ab3
@ -39,6 +39,10 @@ add_library(drmr_ui SHARED
|
|||||||
|
|
||||||
set_target_properties(drmr PROPERTIES PREFIX "")
|
set_target_properties(drmr PROPERTIES PREFIX "")
|
||||||
set_target_properties(drmr_ui 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 ${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)
|
target_link_libraries(drmr_ui ${LV2_LIBRARIES} ${GTK2_LIBRARIES} ${SNDFILE_LIBRARIES} ${SAMPLERATE_LIBRARIES} ${EXPAT_LIBRARIES} m)
|
||||||
|
8
nknob.c
8
nknob.c
@ -96,14 +96,6 @@ GType
|
|||||||
n_knob_get_type (void) {
|
n_knob_get_type (void) {
|
||||||
static GType nknob_type;
|
static GType nknob_type;
|
||||||
if (!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 = {
|
static const GTypeInfo object_info = {
|
||||||
sizeof (NKnobClass),
|
sizeof (NKnobClass),
|
||||||
(GBaseInitFunc) NULL,
|
(GBaseInitFunc) NULL,
|
||||||
|
Loading…
Reference in New Issue
Block a user