1 下载
2 解压
tar xvf qt-everywhere-opensource-src-4.7.1.tar.gz
3 编译安装
cd qt-everywhere-opensource-src-4.7.1
./configure(需要其它编译选项查看configure -h)
make
make install
4 编译FAQ
如果在qt中用了外部的库,编译过程中会出现“undefined reference ...”类似的错误,修改方法为,将mkspecs/common/g++.conf中的QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined这行去掉就ok了,因为你所在平台上的qmake.conf文件会include进来,在编译过程中出现的error或者想修改某些编译设置都可以试着从这几个文件入手.我这里是broadcom的,qmake.conf是这样的
djstava@Thinkpad:~/Workshop/qt4.7.1$ cat mkspecs/qws/linux-mips-g++/qmake.conf
#
# qmake configuration for building with mipsel-linux-g++
#
include(../../common/g++.conf)
include(../../common/linux.conf)
include(../../common/qws.conf)
# modifications to g++.conf
QMAKE_CC = mipsel-linux-gcc
QMAKE_CXX = mipsel-linux-g++
QMAKE_CFLAGS += -mips32
QMAKE_CXXFLAGS += -mips32
QMAKE_LINK = mipsel-linux-g++
QMAKE_LINK_SHLIB = mipsel-linux-g++
# modifications to linux.conf
QMAKE_AR = mipsel-linux-ar cqs
QMAKE_OBJCOPY = mipsel-linux-objcopy
QMAKE_STRIP = mipsel-linux-strip
load(qt_config)
阅读(5691) | 评论(0) | 转发(1) |