Hi,
I am not abt your exact problem, but you can try:
gcc main.c -o main `pkg-config --cflags --libs gtk+2.0`
Note: before `pkg-config... , there is back-tick or tilde - key above Tab key.
Or try,
gcc -Wall -g main.c -o main `gtk-config --cflags` `gtk-config --libs'
Or use,
-I and -L for Include path or Library path options.
And best Google for the all other options, for Widgets compiling.
Hope this helps.