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