I am trying to compile the simple C example from this Tutorial on Ubuntu using gcc. What do I have to use as argument for gcc to include the needed libraries for #incl
What you are trying to do here is making a gtk app, the above solutions are as applicable anywhere like using the -l option and -I option,
However for GTK apps you may also use pkg-config which make it easier as your paths can be predefined
http://www.freedesktop.org/wiki/Software/pkg-config
An interesting example can be found here http://developer.gnome.org/gtk/2.24/gtk-compiling.html