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
- Tar-zxvftslib-1.4.tar.gz-C/usr/local
- cdtslib
- apt-getinstalllibtool
- apt-getinstallautoconf
- apt-getinstallg++
Under the tslib directory
- ./Autogen. sh
- CC = arm-linux-gcc
- #### 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.
- ####./Configure -- prefix =/opt/ts/-- host = arm-linux -- cache-file = arm-linux.cache
- ./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
- make
- makeinstall
2. Install qt-X11
- apt-getinstalllibX11-devlibXext-devlibXtst-dev
- apt-getinstallxorg-dev
Decompress tarzxvfqt-everywhere-opensource-src-4.6.3.tar.gz-C/usr/local/
- mvqt-everywhere-opensource-src-4.6.3qt-everywhere-opensource-src-4.6.3-x11
- ./configure-nomakeexamples-nomakedemos
- 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.
- make&&makeinstall
// What should I do in about three hours?
3. Install qt-x86
- #tarxzvfqt-everywhere-opensource-src-4.6.3.tar.gz-C/usr/local
- #mvqt-everywhere-opensource-src-4.6.3qt-everywhere-opensource-src-4.6.3-x86
- #cdqt-everywhere-opensource-src-4.6.3-x86
- #./configure-prefix/usr/local/Trolltech/Qt-4.6.3-x86-nomakeexamples-nomakedemos
- -nomakedocs-nomaketools-embeddedx86-qvfb
- #make&&makeinstall
4. Install qt -- arm
- ./configure-prefix/usr/local/Trolltech/Qt-4.6.3-arm-release-shared-fast-xplatformqws/linux
- -arm-g++-embeddedarm-depths16-no-qvfb-no-qt3support-qt-sql-sqlite-qt
- -zlib-qt-libpng-qt-freetype-qt-mouse-tslib-no-mouse-pc-no-mouse-linuxtp
- -nomakeexamples-nomakedemos-nomakedocs-nomaketools-I/opt/ts/include-L/opt/ts/lib
Incorrect. Use the following
- ./configure\
- -prefix/usr/local/Trolltech/Qt-4.6.3-arm\
- -release-shared-fast\
- -xplatformqws/linux-arm-g++-embeddedarm\
- -depths16-no-qvfb\
- -no-qt3support-qt-sql-sqlite-qt-zlib-qt-libpng-qt-freetype\
- -qt-mouse-tslib-no-mouse-pc-no-mouse-linuxtp\
- -nomakeexamples-nomakedemos-nomakedocs-nomaketools\
- -I/opt/ts/include-L/opt/ts/lib
After the configure command is executed, You need to modify three files:
- cdqt-embeded-opensource-src-4.6.3-arm
1) lines/src/3 rdparty/freetype/include/freetype/config/ftconfig. h330 under this directory
- "Orr % 0, % 0, % 2, lsl #16 \ n \ t"/* % 0 | = % 2 <16 */
- // 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)
- 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
- PATH=/usr/local/Trolltech/Qt-4.6.3/bin:$PATH
- LD_LIBRARY_PATH=/usr/local/Trolltech/Qt-4.6.3/lib:$LD_LIBRARY_PATH
Save and exit
- 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
- QTEDIR=/usr/local/Trolltech/Qt-4.6.3-x86
- PATH=/usr/local/Trolltech/Qt-4.6.3-x86/bin:$PATH
- LD_LIBRARY_PATH=/usr/local/Trolltech/Qt-4.6.3-x86/lib:$LD_LIBRARY_PATH
Save and exit
- 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
- QTEDIR=/usr/local/Trolltech/Qt-4.6.3-arm
- PATH=/usr/local/Trolltech/Qt-4.6.3-arm/bin:$PATH
- LD_LIBRARY_PATH=/usr/local/Trolltech/Qt-4.6.3-arm/lib:$LD_LIBRARY_PATH
Save and exit
- chmod777setenv.sh
3. Compile qvfb
- cdqt-everywhere-opensource-4.6.3-x11/tools/qvfb
- #####/usr/local/qt-everywhere-opensource-src-4.6.3-x11/tools/qvfb
- 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
- 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
- ./Executable file-qws
- The sample file can be found in the qt-everywhere-opensource-4.6.3-x86/examples or demos)
4. Install QTCreator
- Chmod777qt-sdk-linux-x86-opensource_2010.02.bin
- Cpqt-sdk-linux-x86-opensource_2010.02.bin/opt
- ./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
- #netstat-tl
If the NFS port is in the LISTEN status
3. Configure the NFS server
- #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.
- #/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