Ubuntu installs QT4.8.0 and installs QT Library

Source: Internet
Author: User

First, the source code acquisition.

Official website http://qt.nokia.com/downloads (self-installed 4.8.0)

Second, decompression code

Tar zxvf qt-everywhere-opensource-src-4.8.0.tar.gz

After extracting the source code folder into the decompression

Third, implementation./configure Generate Makefile

./configure-prefix/usr/local/qt-4.8.0

(The directory specified above is/usr/local/qt-4.8.0, which is the install directory after make install)

The following dialog box appears to select Open Source Edition. This is the free version. Enter Yes to accept the agreement.

(1) If your machine various library files complete, after a small meeting, the configuration is complete, the following information will appear
Qt is now configured-building, just run ' make '
Once Everything is built, you must run ' make install '
Qt'll be installed into/usr/local/qt-4.8.0
To reconfigure, run ' make Confclean ' and ' Configure '
Description Makefile File generation succeeded


(2) If the following information appears
Basic XLIB functionality Test failed!
You might need to modify the Include and library search paths byediting
Qmake_incdir_x11 and Qmake_libdir_x11 in/home/gcgily/qt/mkspecs/linux-g++

Workaround:

Cdconfig.test/x11/xlib execute make command to see error message

1. Cause of error: Inside xlib.cpp 24th outfit File # include error because header file is missing

Workaround:

sudo apt-get install Libx11-dev

Execute make command after successful installation

2. Error message:

/usr/bin/ld:cannot Find-lxext

Solutions
sudo apt-get install Libxext-dev

Once the installation is successful, the make command executes without error.

[Other people's experience: The reason is the need to install the LIBX11 development package, in the Ubuntu/debian package name is Libx11-dev

Based on past experience, the following 3 packages are actively installed before./configure, basically everything's going to be all right.

Sudoapt-get install Libx11-dev Libxext-dev Libxtst-dev]

Four, the installation needs to go to the package and then back again./configure to generate makefile files

V. Compiling QT

It takes 2 hours to execute the make command.

Vi. automatic installation of QT Library

sudo apt-get install Qtcreator

Ubuntu installs QT4.8.0 and installs QT Library

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.