Installing GTK+ in Ubuntu

8:55 AM , , 0 Comments

GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating graphical user interfaces. Offering a complete set of widgets, GTK+ is suitable for projects ranging from small one-off tools to complete application suites.

I tried hard for installing GTK+ in Ubuntu's Precise Pangolin. But only after a struggle for 4 days, i was finally able to install GTK+.Here is how i did it :
  1. Download the latest GTK+ from here.
  2. Install the following ( Ignore if you have them already installed ) - This can be done by installing them manually or through Synaptic Package Manager

  3. 1.  libxml2 - Download here
    2.  Pixman - Download here
    2.  FreeType - Download here
    3.  FontConfig - Download here
    4.  ATK - Download here
    5.  Pango - Install via Synaptic
    6.  Cairo - Install via Synaptic
    7.  libxcb - Download here
    8.  libXinerama - Download here
    9.  libXi - Download here
    10. xinput - Download here

  4. Once these packages have been installed, you are ready to install GTK+ on your system and start developing with it
  5. Extract the contents of gtk's archive to the home folder. 
  6. Rename the extracted folder as 'GTK'.
  7. Now, open the terminal and enter the following commands :

  8. cd GTK
    sudo make
    sudo make install

  9. This will take a hell of a time ( about an hour ) to finish.
  10. Once the installation is finished, you can compile the written C program using the following : gcc file.c 'pkg-config --cflags --libs gtk+-3.0'
My GTK+ program
I know, I know, this might have been a drag and took a while to finish. But in the end, you had the last laugh.

A LINUX enthusiast and tech passionate guy. Love to watch Anime and play cricket. Got extra bit of care in myself, guess that's what people call selfishness :-P Google+