詳解 Qt 桌面安裝與建立
本文介紹的是Qt 桌面安裝與建立,不多說,我們先來看步驟,直接進(jìn)入內(nèi)容。軟件:PC 機操作系統(tǒng)Fedora 6
軟件包:
- tmake-1.13.tar.gz qt-embedded-free-3.2.1.tar.bz2
- qt-x11-free-3.3.6.tar.bz2
軟件從國內(nèi)鏡像站點下載,在此感謝齊亮,感謝他為國內(nèi)Qt愛好者的貢獻(xiàn)
FTP地址:http://www.qtopia.org.cn/ftp/mirror/ftp.trolltech.com/
以下的步驟我是在/qt目錄下操作的。
1 安裝tmake
- [root@110 qt]# tar xzvf tmake-1.13.tar.gz
- [root@110 qt]# export TMAKEDIR=/qt/tmake-1.13
- [root@110 qt]# export TMAKEPATH=/qt/tmake-1.13/lib/qws/linux-x86-g++/
- [root@110 qt]# export PATH=/qt/tmake-1.13/bin/:$PATH
環(huán)境變量的設(shè)置是非常重要的,它關(guān)系到能否正確的安裝及編譯這些安裝包.
2 安裝Qt/Embedded 3.2.1
- [root@110 qt]# tar xvf qt-embedded-free-3.2.1.tar.bz2
- [root@110 qt-embedded-free-3.2.1]# export QTDIR=$PWD
- [root@110 qt-embedded-free-3.2.1]# export QTEDIR=$QTDIR
- [root@110 qt-embedded-free-3.2.1]# export PATH=$QTDIR/bin/:$PATH
- [root@110 qt-embedded-free-3.2.1]#
- export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
- [root@110 qt-embedded-free-3.2.1]#
- ./configure -qconfig local -qvfb -depths 16,32
- [root@110 qt-embedded-free-3.2.1]# ./configure -system-jpeg
- [root@110 qt-embedded-free-3.2.1]# make
等待(根據(jù)個人電腦情況)大約一個小時后出現(xiàn)
- The Qt library is now built in ./lib
- The Qt examples are built in the directories in ./examples
- The Qt tutorials are built in the directories in ./tutorial
- Enjoy! - the Trolltech team
完成安裝
3 安裝Qt/X11
- [root@110 qt]# tar xvf qt-embedded-free-3.2.1.tar.bz2
- [root@110 qt]# cd qt-x11-free-3.3.6
- [root@110 qt-x11-free-3.3.6]# export QTDIR=$PWD
- [root@110 qt-x11-free-3.3.6]# export PATH=$QTDIR/bin:$PATH
- [root@110 qt-x11-free-3.3.6]#
- export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
- [root@110 qt-x11-free-3.3.6]# ./configure -no-xft
- [root@110 qt-x11-free-3.3.6]# make
等待(根據(jù)個人電腦情況)大約一個小時后出現(xiàn)
- The Qt library is now built in ./lib
- The Qt examples are built in the directories in ./examples
- The Qt tutorials are built in the directories in ./tutorial
- Enjoy! - the Trolltech team
即完成安裝
- [root@110 qt-x11-free-3.3.6]# make -C tools/qvfb/
- [root@110 qt-x11-free-3.3.6]# mv tools/qvfb/qvfb bin
- [root@110 qt-x11-free-3.3.6]# cp bin/uic $QTEDIR/bin
- cp:是否覆蓋“/qt/qt-embedded-free-3.2.1/bin/uic”? y
4、查看運行結(jié)果
如果上面各步都能夠成功的編譯通過,下面就可以通過運行
- [root@110 qt-x11-free-3.3.6]# qvfb (回車)
小結(jié):關(guān)于詳解 Qt 桌面安裝與建立的內(nèi)容介紹完了希望本文對你有所幫助!更多內(nèi)容請參考編輯推薦!