Install GTK2.0 in Ubuntu

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.