Steps for developing C/C++ GTK code in linux using the Eclipse IDE.

First install the build essential pack from the ubuntu repo
sudo apt-get install build-essential
This installs all of the libraries and the GNU compiler collection.

Second install Eclipse: I'd recommend the latest version that supports the plugin market place. The newest version (4.2 Juno) is not in the ubuntu software repo so you'll need to manually download it here: http://www.genuitec.com/all_eclipse.html download the one specifically for C and for your specific os.

Third after installing Eclipse start it up and access the plugin market place. HELP → Eclipse → Marketplace
Search for the pkg-config plugin and install it. The pkg-config plugin will help you find the include files you need to configure a C project to work with the GTK+.

Fourth restart eclipse and lets make a simple GUI hello world project.
FILE → NEW → C Project

Then select “Executable” THIS IS VERY IMPORTANT!!! SELECT “Executable” (if you don't, eclipse will not configure the make file properly). Then select Hello World GTK project.

Name it whatever you want. Now here's the fun part, you should have a project with a C file created that is filled in all nicely. If you try to compile your project now, it will fail to compile giving you errors about not being able to find the “gtk/gtk.h” file. Well now we must get creative and tell eclipse how to find these files.

Right click your project, select properties. Now on the left side you should see a nice cluster of menus. Select C/C++ Build → Settings. Now click the Pkg-config tab. You'll see a list of all the various paths to files that you may need to include for gtk to work. I'm not exactly sure which are needed but I selected the following: atk, cairo, gdk, gio, glib, and gtk+2.0. By selecting these the pkg-config plugin has modified the makefile and changed your include path.

One more step: Select C/C++ General → Paths and Symbols
You should see a list of include paths, these were created by the pkg-config plugin. We need to add 2 more include paths “/usr/include” and “/usr/include/gtk-2.0” (yeah my gtk folder doesn't match the one pkg-config specified so this covers for it).

Now you're ready to finally begin your GUI adventure. Build the project. (Fix any other errors if missing an include look for it in /usr/include and add a path to it) Then run it!!!

Should look like this: http://i.imgur.com/gtDLm.png