When compiling you can use:
Code:
compile:
gcc -o xxx.o -c xxx.c `pkg-config --flags gtk-2.0`
link:
gcc -o xxx a.o b.o c.o `pkg-config --libs gtk-2.0`
This expands the include directories needed to correctly compile, and libraries needed to link when linking. Don't forget the backquotes.