红联Linux门户
Linux帮助

安装与建立Qt桌面运行环境

发布时间:2007-11-02 09:16:11来源:红联作者:fersuse
软件:PC 机操作系统Fedora 6
软件包:tmake-1.13.tar.gz qt-embedded-free-3.2.1.tar.bz2
qt-x11-free-3.3.6.tar.bz2

软件从国内镜像站点下载,在此感谢齐亮,感谢他为国内Qt爱好者的贡献
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

环境变量的设置是非常重要的,它关系到能否正确的安装及编译这些安装包.

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

等待(根据个人电脑情况)大约一个小时后出现

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

等待(根据个人电脑情况)大约一个小时后出现

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、查看运行结果
如果上面各步都能够成功的编译通过,下面就可以通过运行

[root@110 qt-x11-free-3.3.6]# qvfb (回车)
文章评论

共有 0 条评论