You have installed "libgtk2.0-dev" package in Ubuntu. Apt-get it or use Synaptic Package Manager.
Then use pkg-config to find out both --cflags and --libs path for gtk+-2.0. Like this:
$ pkg-config --cflags gtk+-2.0
and
$ pkg-config --libs gtk+-2.0
---
Download this example of GTK+ 2.0 project:
http://www.futuredesktop.org/tmp/test3.tar.gz ( note: if you must unzip it manually, do: tar -xvzf test3.tar.gz )
Open the project in Code::Blocks and study the settings in Project -> Build options.
* Compiler -- Other options.
and
* Linker -- Other linker options.
-----------
This quide will tell you more.
http://www.gtk.org/tutorial/x111.html 