Ubuntu install GTK2.0 command installation command: sudoapt-getinstallgnome-core-develsudoapt-getinstalllibglib2.0-doclibgtk2.0-docsudoapt-getinstalldevhelpsudoapt-getinstallglade-gnomeglade-commonglade-
Install the GTK2.0 command in Ubuntu
Installation command:
Sudo apt-get install gnome-core-devel
Sudo apt-get install libglib2.0-doc libgtk2.0-doc
Sudo apt-get install devhelp
Sudo apt-get install glade-gnome glade-common glade-doc
To install the GTK environment, you only need to install a gnome-core-devel, which integrates many other packages. In addition, some other things need to be transferred, such as libglib2.0-doc, libgtk2.0-doc help document, devhelp help document view, glade-gnome, glade-common, and glade-doc graphic interface design.
Use external commands to view installed gtk library versions
$ Pkg-config -- modversion gtk + (view version 1.2.x)
$ Pkg-config -- modversion gtk +-2.0 (view version 2.x)
$ Pkg-config -- version (view the version of pkg-config)
$ Pkg-config -- list-all grep gtk (check whether gtk is installed)
Install gtk2.0
Sudo apt-get install libgtk2.0-dev
Application compilation command: gcc test. c 'pkg-config -- cflags -- libs gtk +-2.0 '. The command is compiled and runs normally.
Pkg-config is a program used to manage packages. On the console, enter pkg-config -- cflags -- libs gtk +-2.0, it can be found that the output text includes all the options required for gcc to compile gtk + 2.0 (header file directory and library file ).
Note that gcc test. c 'pkg-config -- cflags -- libs gtk +-100', the quotation marks on both sides of pkg-config -- cflags -- libs gtk +-2.0 are not true quotation marks, it is the character on the far left of the number on the keyboard. If a single quotation mark is used incorrectly, gcc cannot use the text generated by pkg-config -- cflags -- libs gtk +-2.0 as the compilation option. Constructor.