Explanation of the entire process of QT installation (1)

Source: Internet
Author: User

QT InstallationThe whole process is the content to be introduced in this article, mainly to understand and learnQTThis article is mainly to learnQT InstallationThe process and implementation of specific content are described in detail in this article.

I,QtSource code compilation

1. Compile the touch screen software tslib

Decompress tslib-1.4.tar.gz

 
 
  1. Tar-zxvftslib-1.4.tar.gz-C/usr/local  
  2. cdtslib  
  3. apt-getinstalllibtool  
  4. apt-getinstallautoconf  
  5. apt-getinstallg++ 

Under the tslib directory

 
 
  1. ./Autogen. sh
  2. CC = arm-linux-gcc
  3. #### Echo "ac_cv_func_malloc_0_nonnull = yes"> arm-linux.cache // ### it indicates that the comments are removed. The third sentence is the combination of the first two sentences.
  4. ####./Configure -- prefix =/opt/ts/-- host = arm-linux -- cache-file = arm-linux.cache
  5. ./Configure -- prefix =/opt/ts/-- host = arm-linuxac_cv_func_malloc_0_nonnull = yes

Open tests/ts_calibrate.c, modify two open statements, and add the third parameter 0 // atline227229

 
 
  1. make  
  2. makeinstall 

2. Install qt-X11

 
 
  1. apt-getinstalllibX11-devlibXext-devlibXtst-dev  
  2. apt-getinstallxorg-dev 

Decompress tarzxvfqt-everywhere-opensource-src-4.6.3.tar.gz-C/usr/local/

 
 
  1. mvqt-everywhere-opensource-src-4.6.3qt-everywhere-opensource-src-4.6.3-x11  
  2. ./configure-nomakeexamples-nomakedemos  
  3. make&&makeinstall 

In this process, you will be asked to select commercial or open version =, and input o

Then, ask if you want to accept license = and enter yes.

 
 
  1. make&&makeinstall 

// What should I do in about three hours?

3. Install qt-x86

 
 
  1. #tarxzvfqt-everywhere-opensource-src-4.6.3.tar.gz-C/usr/local  
  2. #mvqt-everywhere-opensource-src-4.6.3qt-everywhere-opensource-src-4.6.3-x86  
  3. #cdqt-everywhere-opensource-src-4.6.3-x86  
  4. #./configure-prefix/usr/local/Trolltech/Qt-4.6.3-x86-nomakeexamples-nomakedemos  
  5. -nomakedocs-nomaketools-embeddedx86-qvfb  
  6. #make&&makeinstall 

4. Install qt -- arm

 
 
  1. ./configure-prefix/usr/local/Trolltech/Qt-4.6.3-arm-release-shared-fast-xplatformqws/linux  
  2. -arm-g++-embeddedarm-depths16-no-qvfb-no-qt3support-qt-sql-sqlite-qt  
  3. -zlib-qt-libpng-qt-freetype-qt-mouse-tslib-no-mouse-pc-no-mouse-linuxtp  
  4. -nomakeexamples-nomakedemos-nomakedocs-nomaketools-I/opt/ts/include-L/opt/ts/lib 

Incorrect. Use the following

 
 
  1. ./configure\  
  2. -prefix/usr/local/Trolltech/Qt-4.6.3-arm\  
  3. -release-shared-fast\  
  4. -xplatformqws/linux-arm-g++-embeddedarm\  
  5. -depths16-no-qvfb\  
  6. -no-qt3support-qt-sql-sqlite-qt-zlib-qt-libpng-qt-freetype\  
  7. -qt-mouse-tslib-no-mouse-pc-no-mouse-linuxtp\  
  8. -nomakeexamples-nomakedemos-nomakedocs-nomaketools\  
  9. -I/opt/ts/include-L/opt/ts/lib 

After the configure command is executed, You need to modify three files:

 
 
  1. cdqt-embeded-opensource-src-4.6.3-arm 

1) lines/src/3 rdparty/freetype/include/freetype/config/ftconfig. h330 under this directory

 
 
  1. "Orr % 0, % 0, % 2, lsl #16 \ n \ t"/* % 0 | = % 2 <16 */
  2. // Original: "orr % 0, % 2, lsl #16 \ n \ t"

2)/src/3 rdparty/webkit/WebCore/Makefile

Lines 14 and 15 Add-d1_arm_arch_4t _ (CFLAGS/CXXFLAGS) before-fPIC $ (DEFINES), respectively)

3)/src/script/Makefile

Lines 14 and 15-d1_arm_arch_4t _ (same as above)

 
 
  1. make&&makeinstall 

Ii. Establish the environment Trolltech)

1. Set the environment variable Qt-4.6.3

Go to the/usr/local/Trolltech/Qt-4.6.3 directory

Visetenv. sh or sudogeditsetenv. sh

Add

 
 
  1. PATH=/usr/local/Trolltech/Qt-4.6.3/bin:$PATH  
  2. LD_LIBRARY_PATH=/usr/local/Trolltech/Qt-4.6.3/lib:$LD_LIBRARY_PATH 

Save and exit

 
 
  1. chmod777setenv.sh 

2. Set the environment variable Qt-4.6.3-x86

Go to the/usr/local/Trolltech/Qt-4.6.3-x86 directory

Visetenv. sh or sudogeditsetenv. sh

Add

 
 
  1. QTEDIR=/usr/local/Trolltech/Qt-4.6.3-x86  
  2. PATH=/usr/local/Trolltech/Qt-4.6.3-x86/bin:$PATH  
  3. LD_LIBRARY_PATH=/usr/local/Trolltech/Qt-4.6.3-x86/lib:$LD_LIBRARY_PATH 

Save and exit

 
 
  1. chmod777setenv.sh 

3. Set the environment variable Qt-4.6.3-arm

Go to the/usr/local/Trolltech/Qt-4.6.3-arm directory

Visetenv. sh or sudogeditsetenv. sh

Add

 
 
  1. QTEDIR=/usr/local/Trolltech/Qt-4.6.3-arm  
  2. PATH=/usr/local/Trolltech/Qt-4.6.3-arm/bin:$PATH  
  3. LD_LIBRARY_PATH=/usr/local/Trolltech/Qt-4.6.3-arm/lib:$LD_LIBRARY_PATH 

Save and exit

 
 
  1. chmod777setenv.sh 

3. Compile qvfb

 
 
  1. cdqt-everywhere-opensource-4.6.3-x11/tools/qvfb  
  2. #####/usr/local/qt-everywhere-opensource-src-4.6.3-x11/tools/qvfb  
  3. make 

-- Will generate qvfb in qt-everywhere-opensource-4.6.3-x11/bin,

We copy it to/usr/local/Trolltech/Qt-4.6.3-x86/bin

 
 
  1. cpqvfb/usr/local/Trolltech/Qt-4.6.3-x86/bin 

Run the test ()

Run the setenv. sh script file under x86. The upper-case S in sourcesetenv. shword is incorrect.) Enter qvfb in the command line and run it in the background)

For the Qtcreator project file qmake file name. pro, then make generates the executable file

 
 
  1. ./Executable file-qws
  2. The sample file can be found in the qt-everywhere-opensource-4.6.3-x86/examples or demos)

4. Install QTCreator

 
 
  1. Chmod777qt-sdk-linux-x86-opensource_2010.02.bin
  2. Cpqt-sdk-linux-x86-opensource_2010.02.bin/opt
  3. ./Qt-sdk-linux-x86-opensource_2010.02.bin default installation

6. In ubuntuInstallThe NFS service is convenient when developing the kernel and file system. You can directly use NFS to start the kernel and file system. The installation is as follows:

1. Installation

# Apt-getinstallnfs-kernel-server

2. Enable the NFS port

 
 
  1. #netstat-tl 

If the NFS port is in the LISTEN status

3. Configure the NFS server

 
 
  1. #vim/etc/exports 

Add:/work * (rw, sync, no_root_squash) to the last line, where:/work is the shared directory, * is accessible from any IP address, and no_root_squash indicates that any user can access

4. Restart the NFS service.

 
 
  1. #/etc/init.d/nfs-kernel-serverrestart 

5. view the current working status of the NFS server

#/Etc/init. d/nfs-kernel-serverstatus

If running is displayed, it works normally.

Installation Complete


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.