Simulation QtEmbedded-4.5.2 on x86 host

Source: Internet
Author: User

Author:Sun Xiaoming, a lecturer at Huaqing vision embedded College.

[Lab environment]

1. Master: Fedora9 DVD release
2. Target machine: Virtual Machine
3. source code package:
Ftp://ftp.qtsoftware.com/qt/source/Qt-x11-opensource-src-4.5.2.tar.gz
Ftp://ftp.qtsoftware.com/qt/source/Qt-embedded-linux-opensource-src-4.5.2.tar.gz
4. the compiler Fedora9 comes with gcc version 4.3.0

1. Extract the source code:

[Root @ localhost ~] # Mkdir-p/opt/Qt_X_E
[Root @ localhost] # cd/opt/Qt_X_E

Copy the downloaded source code to this directory.

[Root @ localhost Qt_X_E] # cp/root/share/ Qt-x11-opensource-src-4.5.2.tar.gz ./
[Root @ localhost qt_x_e] # cp/root/share/qt-embedded-linux-opensource-src-4.5.2.tar.gz ./

Decompress the source code:

[Root @ localhost qt_x_e] # tar xzvf qt-x11-opensource-src-4.5.2.tar.gz
[Root @ localhost qt_x_e] # tar xzvf qt-embedded-linux-opensource-src-4.5.2.tar.gz

2. Configure and compile the QT source code:

[Root @ localhost qt_x_e] # cd qt-x11-opensource-src-4.5.2
[Root @ localhost qt-x11-opensource-src-4.5.2] #./configure

Select o to determine the open-source version, and select YES to accept copyright;

[Root @ localhost qt-x11-opensource-src-4.5.2] # Make
[Root @ localhost qt-x11-opensource-src-4.5.2] # make install
[Root @ localhost qt-x11-opensource-src-4.5.2] # cd tools/qvfb
[Root @ localhost qvfb] # Make
[Root @ localhost qvfb] # make install
[Root @ localhost qvfb] # cd ../../../
[Root @ localhost qt_x_e] # file qt-x11-opensource-src-4.5.2/bin/qvfb

The following information is displayed, and qvfb has been generated (which will be used later ):

/Opt/qt_x_e/qt-x11-opensource-src-4.5.2/bin/qvfb: Elf 32-bit LSB executable, Intel 80386, Version 1 (sysv), dynamically linked (uses SHARED libs ), for GNU/Linux 2.6.9, not stripped

3. Configure and compile the QTE source code x86 version:

[Root @ localhost qt_x_e] # Music qt-embedded-linux-opensource-src-4.5.2 qt-embedded-linux-opensource-src-4.5.2-x86
[Root @ localhost qt_x_e] # cd qt-embedded-linux-opensource-src-4.5.2-x86
[Root @ localhost qt-embedded-linux-opensource-src-4.5.2-x86] #./configure-Prefix/usr/local/trolltech/QtEmbedded-4.5.2-x86-embedded x86-qvfb

Select o to determine the open-source version, and select YES to accept copyright;

[Root @ localhost qt-embedded-linux-opensource-src-4.5.2-x86] # Make
[Root @ localhost qt-embedded-linux-opensource-src-4.5.2-x86] # make install
[Root @ localhost qt-embedded-linux-opensource-src-4.5.2-x86] # CD ..
[Root @ localhost qt_x_e] # file/usr/local/trolltech/QtEmbedded-4.5.2-x86/examples/widgets/analogclock

The following information is displayed:

/Usr/local/trolltech/QtEmbedded-4.5.2-x86/examples/widgets/analogclock: Elf 32-bit LSB executable, Intel 80386, Version 1 (sysv ), dynamically linked (uses SHARED libs), for GNU/Linux 2.6.9, stripped

[Root @ localhost qt_x_e] # cp qt-x11-opensource-src-4.5.2/bin/qvfb/usr/local/trolltech/QtEmbedded-4.5.2-x86/bin

4. Run the example code on qvfb.

Create a configuration script

[Root @ localhost qt_x_e] # cd/usr/local/trolltech/QtEmbedded-4.5.2-x86
[Root @ localhost QtEmbedded-4.5.2-x86] # Vim setenv-x86.sh

Add the following content:

Qtedir =/usr/local/trolltech/QtEmbedded-4.5.2-x86
Path = $ qtedir/bin: $ path
LD_LIBRARY_PATH = $ qtedir/lib: $ LD_LIBRARY_PATH

Save and exit.

[Root @ localhost QtEmbedded-4.5.2-x86] # source setenv-x86.sh
[Root @ localhost QtEmbedded-4.5.2-x86] # cd/examples/widgets/analogclock
[Root @ localhost analogclock] # qvfb-width 640-height 480 &
[Root @ localhost analogclock] #./analogclock-qws

See the following interface:

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.