Redhat下配置qt4.4.3

来源:互联网 发布:什么是seo和sem 编辑:程序博客网 时间:2024/04/28 04:30

一开始首先需要获得安装包,这里已经下载好了(版本qt-x11-opensource-src-4.4.3.tar),链接地址

http://download.csdn.net/detail/fzxy002763/4201181

http://download.csdn.net/detail/fzxy002763/4201235

然后传到linux上,然后在Linux下进行配置

登录root,解压缩包

[root@bogon qqq]# tar zvxf qt-x11-opensource-src-4.4.3.tar.gz
然后进入压缩文件夹

[root@bogon qqq]# cd qt-x11-opensource-src-4.4.3[root@bogon qt-x11-opensource-src-4.4.3]# ./configure
就可以进行配置了,然后
[root@bogon qt-x11-opensource-src-4.4.3]# ./configureThis is the Qt/X11 Open Source Edition.You are licensed to use this software under the terms ofthe GNU General Public License (GPL) versions 2 or 3.Type '2' to view the GNU General Public License version 2.Type '3' to view the GNU General Public License version 3.Type 'yes' to accept this license offer.Type 'no' to decline this license offer.Do you accept the terms of either license? yes

这样就可以了(PS:如果要编译嵌入式的交叉编译环境需要加上一些的配置,这里不进行具体配置

PS:这个时间比较长,大致10分钟左右,慢慢等吧,后面更长时间

接着

[root@bogon qt-x11-opensource-src-4.4.3]# gmake[root@bogon qt-x11-opensource-src-4.4.3]# gmake install

长久等待之后终于装好了,找好的文件在目录

/usr/local/Trolltech/Qt-4.4.3

然后需要配置bash

在结尾处加上,然后配置就好了

#QT-4.4.3 config#QTDIR=/usr/local/Trolltech/Qt-4.4.3#PATH=$QTDIR/bin:$PATH#QMAKESPEC=$QTDIR/mkspecs/linux-g++#LD_LIBRARRY_PATH=$QTDIR/lib:$LD_LIBRARRY_PATH#export QTDIR PATH QMAKESPEC LD_LIBRARRY_PATH

使用的方法是,在windows把整个工程传过去,或者直接在Linux下建立

然后qmake,最后make,就行了,然后就能编译运行程序了

[root@bogon helloworld]# qmake[root@bogon helloworld]# make[root@bogon helloworld]# ./helloworld -qws