新客网WWW.XKER.COM:致力做中国最专业的网络学院!
学院: 操作系统 - 网络应用 - 服务器 - 网络安全 - 工具软件 - 办公软件 - Web开发 - 数据库 - 网页设计 - 图形图像 - 媒体动画 - 硬件学堂 - 存储频道 - QQ专区
您的位置:首页 > 网络学院 > 操作系统 > Linux教程 > 正文:新手学堂:安装与建立QT桌面的运行环境

新手学堂:安装与建立QT桌面的运行环境

新客网 XKER.COM 2007-11-05 来源: sixth 收藏本文

软件: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

收藏】 【评论】 【推荐】 【投稿】 【打印】 【关闭
发表评论
要记得去论坛讨论,点击注册新会员匿名评论
评论内容:不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
阅读排行
随机推荐
实用信息推荐