As an example of the macros thing. You use "g_thread_supported()" in plugin.cpp. But in /usr/include/glib-2.0/glib/gthread.h (at least in gthread 2.30.1) it is a macro defined as "g_threads_got_initialized". And the g_thread_supported symbol is not in libgthread-2.0 but in ibglib-2.0. That's why liblightsparkplugin.so depends on glib-2.0 (but you don't need to explicitly link against glib, the dependency comes indirectly from the gthread pkg-config file).
As an example of the macros thing. You use "g_thread_ supported( )" in plugin.cpp. But in /usr/include/ glib-2. 0/glib/ gthread. h (at least in gthread 2.30.1) it is a macro defined as "g_threads_ got_initialized ". And the g_thread_supported symbol is not in libgthread-2.0 but in ibglib-2.0. That's why liblightsparkpl ugin.so depends on glib-2.0 (but you don't need to explicitly link against glib, the dependency comes indirectly from the gthread pkg-config file).