I have a simple program
#include
int main(){
g_print(\"hallo\\n\");
}
and try to compile it on the embedded system (Odroid
You need to add the $(pgk-config --libs glib-2.0) after the main.c in your compile line - because library functions are only dragged into the binary if there is anything using them - so main.c is what is using the g_print, and if the -lglib (or whatever the result of the pkg-config bit is) is before main.c, it doesn't get included in the resulting binary.