GTK+ gcc: undefined reference to all gtk functions when linking
The order is wrong: this is an incredibly common mistake I continue to meet. Previous versions of gcc
were less picky on the argument order and this spread the wrong idea pkgconfig --cflags --libs
works in every position.
Check out this email for info on proper flags ordering. In short:
gcc $(pkg-config --cflags ...) myapp.c $(pkg-config --libs ...)