(5)make
make的过程中会出现一些错误,下面是我出现的错误和相应的解决办法,希望对你有用:
错误一:
/home/qtopia-arm-home/nfs/qtopia-free-2.2.0/qt2/include/qvaluestack.h:57:错误:不能从‘QValueListIterator >’转换到‘const char*’,为实参‘1’(属于‘int remove(const char*)’)
解决办法:
// remove( this->fromLast() );
this->remove(this->fromLast() );
错误二:
jpeglib.h错误
解决办法:
原因是在$MYHOME/nfs/qtopia-free-2.2.0/qtopia/src/3rdparty/plugins/codecs/libflash
中有一个jpeglib.h,但是它不是我们需要的,我们需要的已经拷贝在/home/qtopia-arm-home/arm/include中了,所以将其改名:
cd $MYHOME/nfs/qtopia-free-2.2.0/qtopia/src/3rdparty/plugins/codecs/libflash
mv jpeglib.h jpeglib.h.bak
编译成功了可以再该回来。
错误三:
/usr/local/arm/2.95.3/arm-linux/bin/ld:cannot find -ljpeg
解决办法:
拷贝libjpeg.a到arm/lib
错误四:
In file included fromvideocaptureview.cpp:54:
/usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/sys-include/linux/videodev.h:5:linux/version.h: ?????????
make[6]: ***[.obj/release-shared/videocaptureview.o] 错误 1
解决办法:
在./usr/local/arm/2.95.3/arm-linux/sys-include/linux/videodev.h. 文件中把#i nclude一行屏蔽
错误五:
/usr/local/arm/2.95.3/arm-linux/bin/ld:warning: libuuid.so.1, needed by /home/q topia-arm-home/nfs/qtopia-free-2.2.0/qtopia/lib/libqpe.so,not found (try using -rpath or-rpath-link)
/usr/local/arm/2.95.3/arm-linux/bin/ld:warning: libts-0.0.so.0, needed by /home /qtopia-arm-home/nfs/qtopia-free-2.2.0/qtopia/lib/libqte.so,not found (try usin g -rpath or -rpath-link)
/usr/local/arm/2.95.3/arm-linux/bin/ld:warning: libpng12.so.0, needed by /home/ qtopia-arm-home/nfs/qtopia-free-2.2.0/qtopia/lib/libqte.so,not found (try using -rpath or-rpath-link)
/usr/local/arm/2.95.3/arm-linux/bin/ld:warning: libz.so.1, needed by /home/qtop ia-arm-home/nfs/qtopia-free-2.2.0/qtopia/lib/libqte.so,not found (try using -rp ath or -rpath-link)
/home/qtopia-arm-home/nfs/qtopia-free-2.2.0/qtopia/lib/libqte.so:undefined refe rence to `uncompress'
解决办法:
是编译没带库编译了qmake 工具没生成
我是修改文件
/qtopia-free-2.2.0/qtopia/mkspecs/qws/linux-arm-g++/qmake.conf
将此行
QMAKE_LIBS_QT = -lqte
修改为
QMAKE_LIBS_QT = -lqte -lpng -lts -lz -luuid-ljpeg
参考
错误六:
../../libraries/qtopia/qdawg.cpp:294: 错误:有多余的限定 ‘QDawgPrivate::’在成员‘QDawgPrivate’上
make[6]: *** [.obj/release-shared/qdawg.o] 错误 1
make[5]: *** [all] 错误 2
make[4]: *** [sub-tools-qdawggen] 错误 2
make[3]: *** [sub-src-components_pro] 错误 2
make[2]: *** [all] 错误 2
make[1]: *** [all] 错误 2
解决办法:
vi /home/qtopia-arm-home/nfs/qtopia-free-2.2.0/qtopia/src/libraries/qtopia/qdawg.cpp
// QDawgPrivate::~QDawgPrivate()
~QDawgPrivate()
终于编译成功啦!!!庆贺一下,请我吃饭,哈哈!
(5)将编译成功后的库拷贝到前面指定的安装目录:
makeinstall
命令结束后可以在$MYHOME/nfs/qtopia中看到qtopia的文件系统。
4. 收尾:
别忘了,还有一些库在$MYHOME/arm/lib中,拷贝这些库到qtopia的库中:
cp$MYHOME/arm/lib/* $MYHOME/nfs/qtopia/lib/
如果是用了tslib,还需要拷贝触摸屏校准/测试程序以及相关的库文件:
mkdir$MYHOME/nfs/qtopia/bin/tests
mkdir$MYHOME/nfs/qtopia/lib/ts
cp $MYHOME/arm/tslib/tests/.libs/ts_*$MYHOME/nfs/qtopia/bin/tests
cp$MYHOME/arm/tslib/src/.libs/libts-0.0.so.0* $MYHOME/nfs/qtopia/lib
cp$MYHOME/arm/tslib/src/.libs/libts.so $MYHOME/nfs/qtopia/lib
cp$MYHOME/arm/tslib/plugins/.libs/*.so $MYHOME/nfs/qtopia/lib/ts/
5. 运行:
在你的板子上设置运行环境变量
exportPATH=/bin:/sbin:/usr/bin:/usr/sbin:/qt/bin
exportLD_LIBRARY_PATH=/lib:/usr/lib:/qt/lib
export QWS_KEYBOARD=TTY
export LANG="zh"_CN
export TERMINFO_DIRS=/usr/etc
export ROOT="/root"
export QTDIR="/qt"
export QPEDIR="/qt"
exportQWS_MOUSE_PROTO=TPanel:/dev/h3600_tsraw
如果是用了tslib,还需要设置以下环境变量:
export TSLIB_TSDEVICE=/dev/h3600_tsraw
export TSLIB_CONSOLEDEVICE=/dev/vc/
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_CONFFILE=/qt/etc/ts.conf
export TSLIB_PLUGINDIR=$QTDIR/lib/ts/
export TSLIB_TSEVENTTYPE="H3600"
校准屏幕(5点校准)
如果是用tslib,启动下面的程序校准触摸屏:
通过nfs将/home/qtopia-arm-home/nfs挂载到你的板子,然后在你的板子上执行:
cd到你的qtopia/bin/tests
./ts_calibrate
运行
cd到你的qtopia/bin
./qpe
6. 说明:文中的牵扯路径大致如下:
MYHOME=/home/qtopia-arm-home
PATH=$PATH:/usr/local/arm/2.95.3/bin
$MYHOME-->
arm-->
lib
include
e2fs
jpeg
libpng
tslib
zlib
nfs-->
qtopia
qtopia-free-2.2.0-->
...
dqt
qtopia
qt2
...
7. 参考文档:
Qtopia PDA 2.2.2