Ubuntu10.10 install the QT-embedded Development Environment

Source: Internet
Author: User
Tags gz file
For installing QT, it has been entangled for a long time... I have been tossing for a long time. For a week in a row, I have been exploring for it all day long, constantly compiling configurations, redo and undo it all the time. So far I have no idea whether the problem has been completely solved, record the issue and correct the article today. My Installation Platform: 1. Virtual Machine VMware7.02. embedded system Ubuntu10.102. cross compiler tool: arm-linux-gcc-4.3.23.QT installation package: 1) QT-X11-SDK

For installing QT, it has been entangled for a long time... I have been tossing for a long time. For a week in a row, I have been exploring for it all day long, constantly compiling configurations, redo and undo it all the time. So far I have no idea whether the problem has been completely solved, record the issue and correct the article today.

My Installation Platform:

1. Virtual Machine VMware 7.0

2. Embedded system Ubuntu 10.10

2. Cross-compilation tool: arm-linux-gcc-4.3.2

3. QT installation package:

1) QT-X11-SDK for QT-X11: qt-Sdk-Linux-X86-Opensource-2010.05. 1.bin (actually Qt Creator !)

This is a compiled binary SDK package. You can also download the source code package src and then compile and install it. Many articles on the Internet are installed after the source code package is compiled, no source code package is found in version 4.7.2 on the NOKIA official website. However, installing a binary file can save Compilation Time and space. After installing the binary file, you still need to compile QVFB independently. In fact, This sdk package is QT Creator! An IDE integrated development environment! This saves you the trouble of using command lines for compilation and debugging on your terminal! But sometimes you may find it better to use command lines!

2) Qt Embedded for Linux is short for QTE: qt-Everywhere-Opensource-Src-4.7.2.Tar.gzIs the source code package;

(The QT-X11 can generate Qt development tools, such as qmake, designer and so on, the most important thing is to get qvfb (because the sdk does not compile well, therefore, we need to compile and install qvfb by ourselves. Refer to the next article ). With the embedded development of qvfb, you can develop Qt applications without the actual development board. The QTE version is specifically used for embedded development. Therefore, we need to compile QT for the X86 architecture and arm architecture respectively!

Both installation packages can be downloaded directly in the xp environment. The download speed is faster and then placed in the ubuntu virtual machine.

Start installation below:

1. Create a directory

First, create a/qtenv folder in the/home/fengchao directory.For ease of file management, create three folders under qtenv: arm, x86, and qtsdk. Use the mkdir command or right-click the directory to create a folder.

Qtsdk is used to install QT-X11;

Arm is used to store the arm version of QTE;

X86 is used to store the x86 version of QTE.

2. Install QT-X11:

Qt-Sdk-Linux-X86-Opensource-2010.05.1.Bin in the/qtsdk folder

$ Cd ~ /QTenv/qtsdk
 
$ Chmod u + x qt-sdk-linux-x86-opensource-2010.05.1.Bin
 
$./Qt-sdk-linux-x86-opensource-2010.05.1.bin

Then, install the software in a graphical way, just like installing the software in the xp environment. Then, select the installation directory as/home/fengchao/qtenv/qtsdk, and click NEXT.

3. decompress the QTE source code package

1) copy the source code package to/arm and/x86 respectively:

Copy the file directly in the directory without using the command line.

2) decompress:

$ Cd qtenv/arm

$ Tar xzvf qt-everywhere-opensource-src-4.7.2.Tar.gz

(Use xzvf to decompress the gz file and xjvf to decompress the bz2 file)
$ MvQt-everywhere-opensource-src-4.7.2 arm

(Put the files under the/qt-everywhere-opensource-src-4.7.2 directory under the/arm folder, that is, to change the name of arm, easy to enter)

$ Cd qtenv/x86

$ Tar xzvf qt-everywhere-opensource-src-4.7.2.Tar.gz

(Use xzvf to decompress the gz file and xjvf to decompress the bz2 file)
$ MvQt-everywhere-opensource-src-4.7.2 x86

(Put the files under the/qt-everywhere-opensource-src-4.7.2 directory under the/x86 folder, that is, renamed x86, easy to enter)

4. decompress the package and perform compilation and configuration for the arm platform and x86 platform respectively.

Compile the QT of the arm version

 

$ Cd ~ /Qtenv/Arm
$./Configure-prefix $ HOME/qtenv/Arm-EmbeddedArm-Nomake docs-nomake demo-nomake examples
$ SudoMake
$ SudoMake install

Compile QT for x86

$ Cd ~ /Qtenv/X86

$./Configure-prefix $ HOME/qtenv/X86-EmbeddedX86-Nomake docs-nomake demo-nomake examples-Qvfb
$ SudoMake
$ SudoMake install

Sudo has the root permission. Otherwise, an error may occur.

This process takes too much time, about a few hours, depending on the computer configuration.

This process has many errors, which can be solved and must be patient...

In this compilation project, the tool for compiling the arm version is arm-linux-g ++, and the tool for compiling the x86 version is g ++. Check whether the tool is correct during compilation! I have made such a mistake to input the above compilation command! Cause more inexplicable errors later! You have to try again!

TIPS:

1) After configure, use make confclean and re-configure.

2) After make, you want to clear and try again, use make clean, and then make

5. Finally, set environment variables.

This is also a very important step. The directory management mentioned above is very important in this step.

My solution is to create a shell script file in each folder.

1) QT-X11:

$ Cd qtenv/qtsdk

$ Sudo gedit setenv. sh

Add the following content:

PATH =/home/fengchao/qtenv/qtsdk/qt/bin: $ PATH

LD_LIBRARY_PATH =/home/fengchao/qtenv/qtsdk/lib: $ LD_LIBRARY_PATH

 

Export PATH

Export LD_LIBRARY_PATH

Save and exit. Put the file under qtenv/qtsdk!

2) x86:

$ Cd qtenv/x86

$ Sudo gedit setenv. sh

Add the following content:

QTEDIR =/home/fengchao/qtenv/qtsdk/x86

PATH =/home/fengchao/qtenv/qtsdk/x86/bin: $ PATH

LD_LIBRARY_PATH =/home/fengchao/qtenv/qtsdk/x86/lib: $ LD_LIBRARY_PATH

Export QTEDIR

Export PATH

Export LD_LIBRARY_PATH

Save the exit file and place it in qtenv/x86!

3) arm:

$ Cd qtenv/arm

$ Sudo gedit setenv. sh

Add the following content:

QTEDIR =/home/fengchao/qtenv/qtsdk/arm

PATH =/home/fengchao/qtenv/qtsdk/arm/bin: $ PATH

LD_LIBRARY_PATH =/home/fengchao/qtenv/qtsdk/arm/lib: $ LD_LIBRARY_PATH

Export QTEDIR

Export PATH

Export LD_LIBRARY_PATH

Save the exit file and put it under qtenv/arm!

Run the corresponding script at run time, for example we need to use QT-X11:

Cd/qtenv/qtsdk

Source setenv. sh

Then you can use tools such as qmake designer.

Note: Run these shell scripts to change the environment variables. The change of the entire environment variable is only valid under the current terminal. After opening other terminals, you must re-execute the corresponding shell script.

The corresponding path may be different on everyone's machine. Just understand the meaning.

6. How to compile QVFB?

Please refer to my next article http://www.linuxidc.com/Linux/2011-05/36011.htm

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.