回复: QT-embedded-4.5 for arm的安装和使用
#16 [bhwbj 06-16 18:59]
我把desktop下的screenshot目录拷贝到/usr/local/Trolltech/QtEmbedded-4.5.1-arm下,qmake -project; qmake ;make编译通过。
建议不要一编一大片,需要哪个例子就编哪个。
注:我也是编译desktop出现同样的错误,所以我就进去编一个例子了。
#17 [edgepoly 06-16 21:45]
这个可以 编译通过,不过把编译好的binary文件下载到
板子(MW2440)上还是跑不起来的。
错误提示如下:
bash-4.0# /data/screenshot
QWSSocket::connectToLocalFile could not connect:: Connection refused
QWSSocket::connectToLocalFile could not connect:: Connection refused
QWSSocket::connectToLocalFile could not connect:: Connection refused
QWSSocket::connectToLocalFile could not connect:: Connection refused
QWSSocket::connectToLocalFile could not connect:: Connection refused
QWSSocket::connectToLocalFile could not connect:: Connection refused
No Qtopia Core server appears to be running.
If you want to run this program as a server,
add the "-qws" command-line option.
bash-4.0#
引用第16楼bhwbj于2009-06-16 18:59发表的:
我把desktop下的screenshot目录拷贝到/usr/local/Trolltech/QtEmbedded-4.5.1-arm下,qmake -project; qmake ;make编译通过。
建议不要一编一大片,需要哪个例子就编哪个。
注:我也是编译desktop出现同样的错误,所以我就进去编一个例子了。
#18 [bhwbj 06-17 10:12]
唔,拜托,运行的时候要加 -qws 你还是没仔细看过我的帖子啊。。。。
#19 [edgepoly 06-17 11:34]
引用第18楼bhwbj于2009-06-17 10:12发表的:
唔,拜托,运行的时候要加 -qws 你还是没仔细看过我的帖子啊。。。。
呵呵,不好意思啊。
我现在在我平台装了两个qt-embedded, 一个是 for x86的,用qvfb模拟framebuffer, 另外一个是for arm版的
我写了一个基本的helloWorld.cpp
#include
#include
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QLabel *label=new QLabel("Hello Qt");
label->setGeometry(10,10,200,80);
label->show();
return app.exec();
}
在主机端和 arm开发板上都能正常运行,区别是arm开发板能支持usb鼠标,不过目前还不支持光标,操作起来有点困难。
在开发板上会显示一个对话框窗口,绿色背景的。
然后我用同样的方法编译 examples/desktop/screenshot/例子,会在该目录下生成screenshot 可执行文件(一个是elf for x86, 一个是 elf for arm)
在主机端(x86版)运行
./screenshot -qws
能够正常运行
但是在arm开发板上运行却
报如下错误,是不是没有考什么库啊?
bash-4.0# ./screenshot -qws
./screenshot: symbol lookup error: ./screenshot: undefined symbol: _ZN7QWidget9dropEventEP10QDropEvent
bash-4.0# udevd-event[2419]: rmdir(//dev) failed: Device or resource busy
udevd-event[2417]: rmdir(//dev) failed: Device or resource busy
bash-4.0#
请楼主在再帮我分析一下是什么问题,谢了。
#20 [bhwbj 06-17 12:23]
我的板子上空间不够了,所以用nfs挂载了pc上的/usr/local/Trolltech/QtEmbedded-4.5.1-arm 到/mnt/hd
export PATH=/mnt/hd:/bin:/usr/bin:/usr/local/bin:$PATH
export LD_LIBRARY_PATH=/mnt/hd/lib:/lib:/usr/lib:/usr/local/lib:$LD_LIBRARY_PATH
export set QWS_MOUSE_PROTO=LinuxTP:/dev/h3600_tsraw
export QT_PLUGIN_PATH=/mnt/hd/plugins
export QT_QWS_FONTDIR=/mnt/hd/lib/fonts
export QWS_DISPLAY="LinuxFb:mmWidth100:mmHeight130:0"
在板子上运行/mnt/hd/demos/screenshot/screenshot -qws
没有错误,正常运行了。
我在板子上运行Qtembedded for x86编译的screenshot,错误是:
line 1: syntax error: "(" unexpected
你的错误还是头一次见到,关rmdir什么事呢??一个删除目录的命令 - -!
不过“./screenshot: symbol lookup error” 我感觉和环境变量的有关。我先吃饭啊,一会再看看。