Well, you probably forgot to link the the gtk+ library. If you would want to compile it from the command line remember to use pkg-config (for gtk 2.0 and higher).

gcc -Wall -o hellogtk hellogtk.c...