I used this method to install GTK 2.20.1 in Ubuntu 10.04. I. installation 1. Install basic programming tools such as gcc/g ++/GDB/make $ sudo apt-Get install build-essential 2. Install libgtk2.0-dev libglib2.0-Dev library File $ sudo apt-Get install gnome-core-devel 3, used to compile GTK Program Automatically find the header file and Library File Location $ sudo apt-Get install PKG-config 4, install devhelp GTK file viewing program $ sudo apt-Get install devhelp 5, install GTK/glib API reference manual and other help documents $ sudo apt-Get install libglib2.0-Doc libgtk2.0-Doc 6. Install GTK-based interface GTK, which is the C/C ++ language graphics library for GNOME window development $ sudo apt-Get install Glade libglade2-dev or $ sudo apt-Get install Glade-gnome Glade-common Glade-Doc 7, install gtk2.0 or download and install all the files required by GTK + 2.0 $ sudo apt-Get install libgtk2.0-dev or $ sudo apt-Get install libgtk2.0 * 2. View GTK library version 1. View 1.2.x version $ PKG-config -- modversion GTK + 2. View 2.x version $ PKG-config -- modversion GTK +-2.0 3. view the version of PKG-CONFIG $ PKG-config -- version 4. Check whether GTK $ PKG-config -- list-all is installed. grep GTK 3. Test Program Replication Code // Helloworld. C # include <GTK/GTK. h> int main (INT argc, char * argv []) {gtkwidget * window; gtkwidget * label; gtk_init (& argc, & argv);/* Create the main, top level, window */window = gtk_window_new (gtk_window_toplevel);/* give it the title */gtk_window_set_title (gtk_window (window), "Hello World "); /* connect the destroy signal of the window to gtk_main_quit * when the window is about to be destroyed we get a notification and * Stop the main GTK + loop */g_signal_connect (window, "Destroy", g_callback (gtk_main_quit), null);/* create the "Hello, world" label */label = gtk_label_new ("Hello, world "); /* and insert it into the main window */gtk_container_add (gtk_container (window), label);/* Make sure that everything, window and label, are visible */gtk_widget_show_all (window);/* Start the main loop, and let it rest until the application is closed */gtk_main (); Return 0 ;} copy Code 4. Compile and run 1. Compile $ gcc-O helloworld. c 'pkg-config -- cflags -- libs GTK +-2.0 '2. run $. /helloworld