Construction of Qt4.5.3 development environment under Linux

Source: Internet
Author: User

operating system: Ubuntu12.04
Build Environment: Qt4.5.3 development Environment--compile library files and Qmake tools
① to http://download.qt.io/archive/qt/4.5/website download compile source fileAnd then put it in the Ubuntu system for decompression:
TAR–XZVF qt-x11-opensource-src-4.5.3.tar.gz
TAR–XZVF qt-embedded-linux-opensource-src-4.5.3.tar.gz
The role of these two source packages: qt-x11-4.5.3 is the software that runs on the Linux platform for simulating QT applications, so you can use the Linux platform
Debug your application and then use QT4.5.3 to compile the application into an arm version to download to the Development Board so you can ship
line up your QT app.
some information on the internet when it comes to compiling the QT development environment is listed qt-x11, Qt-embedded...x86, Qt-embedded-linux-opensource-src-4.5.3-arm these three one to make me dizzy ah, what to do with, so troublesome. Results Check AH check, originally, as the name implies:
version qt-x11:The QT Library source code running on the PC-the main development time is used to simulate the development platform so that it can be played without the development Board
version qt-embedded-x86:x86 system of embedded board running QT Library Source code
Qt-embedded-arm:the QT Library source code running on ARM Board

This is a glance, so that the reader will know that I need to compile which source packages. The next step is to document the process of compiling qt-x11 and qt-embedded-arm libraries.


② Compiling and installing qt-x11--Success
then the above decompression steps, followed by the following command:
CD qt-x11-opensource-src-4.5.3
./configure//This configuration file will specify the default installation path/usr/local/trolltech/qt-4.5.3 to the makefile file, which can be opened to see "prefix" Configuration items
Make//This compilation is a bit long, I compiled 1 hours over 20 minutes. Make when using the compiler is the source package, it is said that from the beginning of Qt3.0 do not have to compile their own compiler, the previous version is to compile what Tmake
Make Install//If you want to uninstall: Make uninstall
so qt-x11 compile generated libraries and compile-time qmake tools are installed into this directory/usr/local/trolltech/qt-4.5.3
"
attached 1:qmake This thing is used to generate platform-related makefile files
configuration options with 2:configure files usually have "-prefix"--Specify the installation path, usually the executable file, the installation path of the library file
for example:./configure-prefix/dir1/dir2/xxx
use the "./configure--help" directive to view the usage:
usage:configure [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
...
...
slowly see the ^_^


③ Installing the QVFB tool
qt-x11-opensource-src-4.5.3 in the middle there is the qvfb of the original code package, the following is the choice of qt-x11-opensource-src-4.5.3, with the tool compiled to build the Qvfb tool.
preparatory work:
To copy deviceskin.h,deviceskin.cpp to Qvfb file, first look for:
[Email protected]:~/qt4.5.3/qt-x11-opensource-src-4.5.3/tools# Find/-name "*deviceskin.h*"
/home/clbiao/qt4.5.3/qt-x11-opensource-src-4.5.3/tools/shared/deviceskin/deviceskin.h
/home/clbiao/qt4.5.3/qt-embedded-linux-opensource-src-4.5.3-arm/tools/shared/deviceskin/deviceskin.h
/home/clbiao/qt4.5.3/qt-embedded-linux-opensource-src-4.5.3-x86/tools/shared/deviceskin/deviceskin.h
[Email protected]:~/qt4.5.3/qt-x11-opensource-src-4.5.3/tools#
[Email protected]:~/qt4.5.3/qt-x11-opensource-src-4.5.3/tools# Find/-name "*deviceskin.cpp*"
/HOME/CLBIAO/QT4.5.3/QT-X11-OPENSOURCE-SRC-4.5.3/TOOLS/DESIGNER/SRC/LIB/.MOC/RELEASE-SHARED/MOC_ Deviceskin.cpp
/home/clbiao/qt4.5.3/qt-x11-opensource-src-4.5.3/tools/shared/deviceskin/deviceskin.cpp
/home/clbiao/qt4.5.3/qt-embedded-linux-opensource-src-4.5.3-arm/tools/shared/deviceskin/deviceskin.cpp
/home/clbiao/qt4.5.3/qt-embedded-linux-opensource-src-4.5.3-x86/tools/shared/deviceskin/deviceskin.cpp
[Email protected]:~/qt4.5.3/qt-x11-opensource-src-4.5.3/tools# CP.. /.. /qt-embedded-linux-opensource-src-4.5.3-arm/tools/shared/deviceskin/deviceskin.h./qvfb/
[Email protected]:~/qt4.5.3/qt-x11-opensource-src-4.5.3/tools# CP.. /.. /qt-embedded-linux-opensource-src-4.5.3-arm/tools/shared/deviceskin/deviceskin.pp./qvfb/
Continue:
CD QVFB
made up a sudden thought that since the first step X11 are compiled, and compiled installation directory under the demo and example, for Mao not advanced to see if can run it?!
then try it!
Cd/usr/local/trolltech/qt-4.5.3/demos/mainwindow
./mainwindow
Do it! Sure enough to run, there are windows jumping out, so cool!
Resolute no longer follow the online collection method to compile. Where does this qvfb come from? Not ubuntu12.04?! No. Because see open window in the sidebar icon is green Q, is it?! Yes, it was installed when the Qtcreater was installed. Forgot to say that before compiling these QT libraries I went to Ubuntu Software Center to download the Qtcreator Version2.4.1 directly installed
qvfb--qt virtual buffer frame, embedded development with QVFB, you can not need the actual development Board, can also develop QT application process
the following QT development tools are available when compiling qt-x11 alone:you can go to the compiled installation directory to see
design tools for the DESIGNER--QT interface
uic--can convert the QT interface description file into the corresponding. h and. cpp Files
moc--translates QT signal and slot definitions into standard C + + syntax

④ Compiling and installing qt-embedded--Success
//Embedded ARM architecture version
CP-RF qt-embedded-linux-opensource-src-4.5.3 qt-embedded-linux-opensource-src-4.5.3-arm//This instruction is just for copying an extracted source file
CD Qt-embedded-linux-opensource-src-4.5.3-arm
./configure-prefix/usr/local/trolltech/qtembedded-4.5.0-arm-embedded Arm-lrt-little-endian
make//This also will compile for a long time, to install finished 1个小时40分钟
Make Install
"
configuration Options Analysis:
-prefix/usr/local/trolltech/qtembedded-4.5.0-arm//Specify the installation path
-embedded Arm//designated platform
-little-endian//designated as small-end storage
-LRT//No designation will be
attached: Compiling the embedded X86 schema version of the QT library
MV qt-embedded-linux-opensource-src-4.5.3 qt-embedded-linux-opensource-src-4.5.3-x86
CD qt-embedded-linux-opensource-src-4.5.3-x86
./configure-prefix/usr/local/trolltech/qtembedded-4.5.3-x86-embedded X86-qvfb
Make
Make Install
"

Fix ^_^.

The 2 libraries and tools compiled above add up to 1.8G, not the general big!

The next blog post will record the use of tools such as compile library files and qmake to develop QT Project



Construction of Qt4.5.3 development environment under Linux

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.