Cross-compile the target machine version of QTE and qtopia (by onebyte)

Source: Internet
Author: User
[Compiling environment Note:]

The Linux operating system of the host machine is fedro core 5.

Tool chain version: Arm-Linux-G ++ 2.95.3,

Host compilation tool chain GCC version 4.1.0

QT-X11 version 2.3.2

QT/e 2.3.7

Qtopia version 1.7.0


(1) Compile QT-X11
  • Decompress qt-x11-2.3.2.tar.gz and change the decompressed folder name to qt-x11.

  • CD qt-x11

  • Change the src/tools/qvaluestack in the qt-x11 folder. h 57th line source code remove (this-> fromlast (); for this-> remove (this-> fromlast (); otherwise, [XML/qxml. o] Error

  • Create a set-env file

    Export qtdir = $ pwd

    Export Path = $ qtdir/bin: $ path

    Export manpath = $ qtdir/doc/MAN: $ manpath

    Export LD_LIBRARY_PATH = $ qtdir/lib: $ LD_LIBRARY_PATH

    Echo Yes |./configure-no-xft-no-OpenGL-no-Sm

    Make

  • In this folder, run the "source set-env" command (there is a space between. And set-env)

(2) Compile the qte-2.3.7 of the target machine version

  • To compile qtopia, copy the./src/QT/qconfig-qpe.h under the qtopia folder to the src/tools/

  • Then create the set-env file.

    #! /Bin/bash

    # Compile a QTE script

    # $ PWD indicates the folder where QTE is located.

    Export qtdir = $ pwd

    Export qtedir = $ qtdir

    Export Path = $ qtdir/bin: $ path

    Export Path =/usr/local/ARM/2.95.3/bin: $ path

    Export LD_LIBRARY_PATH = $ qtdir/lib: $ LD_LIBRARY_PATH

    Echo Yes |./configure-platform linux-x86-g ++-xplatform Linux-arm-G ++-qconfig qpe-Depths 16,24, 32

    Make

  • Run "source set-env"

  • Note that in configure, you must specify platform and xplatform, and set platform to linux-x86-g ++, otherwise when using Linux-generic-G ++, find the default g ++ path of the current system. Because the new G ++ path is set in the path, an error occurs.

  • To be transplanted to the target machine, run $ qtedir/lib/libqte. so. x. y. copy Z to the Lib folder on the target machine and name it/lib/libqte. so. X (based on the preceding libqte number );

    Copy $ qtedir/lib/fonts/fontdir to the installation path of QT/E on the target machine (by setting $ qtdir on the target machine ), for example,/usr/local/Qt-embedded/lib/fonts/fontdir

(3) Compile the qtopia-1.7.0 of the target machine version

  • When compiling qtopia, you need to use the UIC command of QTE to explain the related resources, copy the UIC command in the bin directory of the compiled qt-x11 to qtedir/bin.

  • Create a set-env file:

    #! /Bin/bash

    # Install qtopia

    Export qpedir = $ pwd

    # The qtdir here is the QT/e path compiled earlier.

    Export qtdir =/friendly-arm/ARM-qtopia/QT

    Export qtedir = $ qtdir

    # Set the location of the tool chain on the local machine according to your personal situation

    Export Path =/usr/local/ARM/2.95.3/bin: $ path

    Export Path = $ qtdir/bin: $ path

    Export Path = $ qpedir/bin: $ path

    Export LD_LIBRARY_PATH = $ qtdir/lib: $ LD_LIBRARY_PATH

    CD./src

    Echo Yes |./configure-platform Linux-arm-G ++

    Make

  • Run "source set-env"

  • If you want to port data to the target machine, bind, apps, etc, plugins, services, sounds, i18n, Lib, pics, copy the help folder to qpedir on the target machine (by setting qpedir)

  • Create the qtopia script file in the bin directory of the target machine (as shown below)

    #! /Bin/sh

    Export set home =/root

    Export set qtdir =/opt/QT

    Export set qpedir =/opt/qtopia

    Export set qws_keyboard = "USB:/dev/input/event1"

    Export set qws_mouse_proto = "USB:/dev/input/mouse0"

    Export set Path = $ qpedir/bin: $ path

    Export set LD_LIBRARY_PATH = $ qtdir/lib: $ qpedir/lib

    $ Qpedir/bin/qpe>/dev/null 2>/dev/null

  • After the target machine is started, qtopia can be directly started.

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.