原文来自我的cesdn:http://www.cesdn.org/?114
我到环境是ubuntu10.04 + qtcreator2.0.1 + qt4.5.0 :启动qtcreator按照提示,新建一个 工程。编译时候,注意设置qmake路径,不然会报错。在tools里面到options设置需要重启qtcreator。编译x86的测试:进入工程到文件目录,配置好x86的环境,注意之前没有配置QMAKESPEC,所以编译到时候提示找不到,配置QMAKESPEC=/usr/local/Trolltech/Qt-Embedded4.5.0-x86/mkspecs/linux-g++qvfb -width 800 -height 600& ./testui -qws&测试arm版本:make最后出现错误:/usr/local/Trolltech/QtEmbedded-4.5.0-arm/lib/libQtGui.so: undefined reference to `QWSTslibMouseHandler::QWSTslibMouseHandler(QString const&, QString const&)'/usr/local/Trolltech/QtEmbedded-4.5.0-arm/lib/libQtGui.so: undefined reference to `QWSUsbKeyboardHandler::QWSUsbKeyboardHandler(QString const&)'collect2: ld returned 1 exit statusmake: *** [testui] 错误 1难道是我编译到时候没有配置输入设备到支持? 查看之前到编译记录,这个是做了的,顶个肺哦,只有从来。估计那个拷贝到tslib不好用。是安装时候的目录是有效的。于是从新编译qte-arm 。ok:root@ran-desktop:/home/ran/workspace/test/test# lsmain.cpp mainwindow.o moc_mainwindow.o ui_mainwindow.hmain.o mainwindow.ui testmainwindow.cpp Makefile test.promainwindow.h moc_mainwindow.cpp test.pro.userroot@ran-desktop:/home/ran/workspace/test/test# file testtest: ELF 32-bit LSB executable, ARM, version 1, dynamically linked (uses shared libs), for GNU/Linux 2.4.3, not stripped