2.2 编译步骤建立编译目录:
mkdir –p /home/work/armqt/qtlibsource
解压以上软件分别得到:
qt-x11,tmake-1.13, qt-2.3.7,e2fsprogs-1.39, jpeg-6b, libpng-1.2.14, zlib-1.2.3, tslib-1.3,qtopia-free-2.2.0
安装顺序:先安装qt-x11-2.3.2,再安装qt-embedded-2.3.7,最后安装qtopia-free-2.2.0。
安装qt-x11-2.3.2和qt-embedded-2.3.7,需要3个软件安装包:tmake工具安装包,Qt/Embedded安装包,Qt的X11版的安装包
· tmake1.13 或更高版本:生成Qt/Embedded应用工程的Makefile文件。
· Qt/Embedded:Qt/Embedded安装包。
·
Qt 2.3.2for X11:Qt的X11 版的安装包,产生x11开发环境所需要的两个工具uci,designer
1)
编译qt-x11,得到本机运行工具uic,designer,qvfb
export TMAKEDIR=/home/work/armqt/qtlibsource/tmake-1.13
exportTMAKEPATH=/home/work/armqt/qtlibsource//tmake-1.13/lib/linux-g++
exportQTDIR=/home/work/armqt/qtlibsource/temp/qt-x11
export PATH=$QTDIR/binPATH
exportLD_LIBRARY_PATH=$QTDIR/libLD_LIBRARY_PATH
./configure -no-opengl
make
make -C tools/qvfb
mv tools/qvfb/qvfb bin
编译可能遇到的问题:
a)
/home/work/armqt/qtlibsource/qt-x11/include/qvaluestack.h:In member function ‘T QValueStack<T>::pop() [with T = QMap<QString,QString>]’:
xml/qxml.cpp:513:
instantiated from here
/home/work/armqt/qtlibsource/qt-x11/include/qvaluestack.h:57:错误:不能从 ‘QValueListIterator<QMap<QString, QString> >’ 转换到 ‘const char*’,为实参 ‘1’(属于 ‘int remove(const char*)’)
/home/work/armqt/qtlibsource/qt-x11/include/qvaluestack.h:In member function ‘T QValueStack<T>::pop() [with T = QString]’:
xml/qxml.cpp:2502:
instantiated from here
/home/work/armqt/qtlibsource/qt-x11/include/qvaluestack.h:57:错误:不能从 ‘QValueListIterator<QString>’转换到 ‘const char*’,为实参 ‘1’(属于 ‘int remove(const char*)’)
解决办法:viinclude/qvaluestack.h
第57行修正如下:
remove(this->fromLast() );---àthis->remove(this->fromLast() ); |