Install QTE4.5 in Ubuntu10.10

Source: Internet
Author: User
1. Download the source code package: Ghost

1. Download source package: http://get.qt.nokia.com/qt/source/

A. Qt 4.5.2 for Open Source C ++ development on Linux/X11 [120 Mb]
Qt-x11-opensource-src-4.5.2.tar.gz
 
This source package is used to develop Qt programs in Linux systems. The developed programs can only run on PCs. It contains tools such as designer and qvfb.
 
B. Qt 4.5.2 for Open Source C ++ development on Embedded Linux [124 Mb]
Qt-embedded-linux-opensource-src-4.5.2.tar.gz

This source package is used for Embedded LinuxQt application development. The ultimate goal of the developed program is to run on the Development Board, but it can also be simulated on a PC using the qvfb tool. Therefore, the compressed file will be decompressed into two folders later as the Qt environment of the Development Board and the simulated environment of QT on the PC.

2. Configure the Ubuntu 10.10 compiling environment

A. Install g ++: sudo apt-get g ++

B. Install the library used for compiling X11: sudo apt-get libx11-dev libxext-dev

C. install libxtst-dev: sudo aptitude install libxtst-dev; otherwise, an error occurred while compiling qvfb.
 
D. Install the cross-compiler arm-liunx-gcc and set the environment variable. If you do not download the tool, find it online. Install it in the/usr/local/arm/directory. Add export PATH =/usr/local to the last row of. bashrc.
/Arm/4.3.2/bin: $ PATH, which is used as an environment variable.

3. Compile and install qt-x11-opensource-src-4.5.2

A. Decompress qt-x11-opensource-src-4.5.2.tar.bz2 in your downloaded directory.

Www.linuxidc.com @ ubuntu :~ /Download $ tar xjvf qt-x11-opensource-src-4.5.2.tar.bz2

B. Enter the decompressed directory.
Www.linuxidc.com @ ubuntu :~ /Download $ cd qt-x11-opensource-src-4.5.2

C. Configure
Www.linuxidc.com @ ubuntu :~ /Download/qt-x11-opensource-src-4.5.2 $./configure

D. Compile
Www.linuxidc.com @ ubuntu :~ /Download/qt-x11-opensource-src-4.5.2 $ make

E. Install
Www.linuxidc.com @ ubuntu :~ /Download/qt-x11-opensource-src-4.5.2 $ make install

After a long compilation process, the default installation in/usr/local/Trolltech/Qt-4.5.2, after the completion of the compilation of the source program do not delete, there is a use.
 
4. Compile the configuration QtEmbedded-4.5.2-x86 version

The reason for compiling the x86 Qt is to simulate the program developed for the Development Board on a PC.
 
A. Extract
Www.linuxidc.com @ ubuntu :~ /Download $ tar xjvf qt-embedded-linux-opensource-src-4.5.2.tar.bz2
Www.linuxidc.com @ ubuntu :~ /Download $ mv qt-embedded-linux-opensource-src-4.5.2 qt embedded-linux-opensource-src-4.5.2-x86

Www.linuxidc.com @ ubuntu :~ /Download $ cd qt-embedded-linux-opensource-src-4.5.2-x86

B. Configure and compile:
Www.linuxidc.com @ ubuntu :~ /Download/qt-embedded-linux-opensource-src-4.5.2-x86 $./configure-prefix/usr/local/Trolltech/QtEmbedded-4.5.2-x86-embedded x86-qvfb
Www.linuxidc.com @ ubuntu :~ /Download/qt-embedded-linux-opensource-src-4.5.2-x86 $ make
C. install it in the/usr/local/Trolltech/QtEmbedded-4.5.2-x86 directory:
Www.linuxidc.com @ ubuntu :~ /Download/qt-embedded-linux-opensource-src-4.5.2-x86 $ make install

D. Create a script file: setenv_x86.sh and enter the following content:
Export QTEDIR =/usr/local/Trolltech/QtEmbedded-4.5.2-x86/
Export PATH =/usr/local/Trolltech/QtEmbedded-4.5.2-x86/bin/: $ PATH
Export LD_LIBRARY_PATH =/usr/local/Trolltech/QtEmbedded-4.5.2-x86/lib/: $ LD_LIBRARY_PATH

E. Run this script file before compiling the QT application of x86:
$ Source setenv_x86.sh www.linuxidc.com @ ubuntu:/usr/local/Trolltech/QtEmbedded-4.5.2-x86
 
5. Compile qvfb
 
Www.linuxidc.com @ ubuntu :~ // Download $ cd/qt-x11-opensource-src-4.5.2/tools/qvfb/
Www.linuxidc.com @ ubuntu :~ /Download/qt-x11-opensource-src-4.5.2/tools/qvfb $ make
Copy the qvfb generated under the/qt-x11-opensource-src-4.5.2/bin/directory to the x86 directory:
Www.linuxidc.com @ ubuntu :~ /Download $ cp/qt-x11-opensource-src-4.5.2/bin/qvfb/usr/local/Trolltech/QtEmbedd-4.5.2-x86/bin
6. Test

Www.linuxidc.com @ ubuntu :~ /Download $ cd/usr/local/Trolltech/QtEmbedded-4.5.2-x86/demos/boo
Ks

Qvfb-width 640-height-480 &
./Books-qws

Related Article

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.