8
I want to create a custom GTK module which should be loaded when I start a GTK application.
Documentation on this topic is rare, I searched a lot but I failed to get it running. I'm on Ubuntu Linux with GTK3 and tried sofar:
- Compiled and linked a shared library with the method
void gtk_module_init(gint *argc, gchar ***argv[])inside. As far as I understood, this should be enough to create a simple module. Full code:
#include <iostream>
#include <gtk/gtk.h>
void gtk_module_init(gint *argc, gchar ***argv[]) {
std::cout << "huhu" << std::endl;
}
- Put this lib into /usr/lib/x86_64-linux-gnu/gtk-3.0/modules/libtest-gtk-module.so
- Tried to launch an application like this:
gnomine --gtk-module=libtest-gtk-module.soBut all I get is:Gtk-Message: Failed to load module "libtest-gtk-module.so"
So what else has to be done in order to make GTK load this library?
Many thanks in advance!