Sorry my bad, didn't realise that the packages are referred to as 2.0 for the purpose of compiling irrespective of version.
If you want to check the version try:
apt-cache show libgtk2.0-0 | grep Version
if the package is named something different on debian you could try:
apt-cache search libgtk
to track it down.
For the sleep function have you included unistd.h?
Are you able to include code from around each of your warnings? Sometimes errors propagate and are only noticed later. I think I sometimes get implicit declarations at odd places when I forget semicolons and stuff like that.
If you move to an autotools format (which is useful as the configure stage will help you in making your compilation easier cross-platform) an example configure.ac file (that uses gettext for translation support and gnome documentation) would be (the version you can control in the PKG_CHECK_MODULES line):
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
PKG_CHECK_MODULES([YOURLIBMACRO], [gtk+-2.0 >= 2.14])
AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile po/Makefile.in])
A makefile.am in your root directory as:
SUBDIRS= doc po src
ABOUT-NLS confsupp/config.rpath m4/ChangeLog \
AUTHORS ChangeLog COPYING COPYING-DOCS INSTALL NEWS README TODO \
$(pixmap_DATA) $(Applications_DATA) \
ACLOCAL_AMFLAGS = -I m4
and one in your source directory as:
AM_CPPFLAGS= -DLOCALEDIR=\"$(localedir)\" -DPACKAGE=\"$(PACKAGE)\"