yulutong 发表于 2011-7-29 12:35:52

QT的helloworld,用make时出现了:make 没有什么可以做的为'first'

安装tslib,QTOPIA4.4.3,用QT creat 实现能在ubuntu上运行的helloworld

接下来是用qmake生成makefile
再make
就出现了如题错误。

yulutong 发表于 2011-7-29 13:17:53

解决。先make clean

yulutong 发表于 2011-7-29 16:15:01

现在已经交叉编译好了helloworld,用4.2.2-eabi,arm-linux-gcc 4.4.1,arm-linux-gcc 4.3.2都试过产生不同的helloworld,用SD卡放到开发板上都不能运行啊。
root@tony:/forlinx/helloworld# file helloworld
helloworld: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.14, not stripped

开发板上的提示:
# ./helloworld
./helloworld: error while loading shared libraries: libQtGui.so.4: cannot open shared object file: No such file or directory
----------------
如何查询到开发板QT版本?

飞凌-fatfish 发表于 2011-7-29 16:57:38

./helloworld: error while loading shared libraries: libQtGui.so.4: cannot open shared object file: No such file or directory


需要设置环境变量

飞凌-fatfish 发表于 2011-7-29 16:57:46

lib的环境变量

yulutong 发表于 2011-8-1 09:01:06

多谢斑竹回复,我看全书上变量是这样写的:
export PATH='/opt/Qtopia.4.4.c/bin:/sbin:/usr/sbin:/bin:/usr/bin'
export QPEDIR='/opt/Qtopia4.4.3'
export QTDIR='/opt/Qtopia4.4.3'
export QT_QWS_FONTDIR='/opt/Qtopia4.4.3/lib/fonts/'
export QWS_DISPLAY='LinuxFb:mmWidth76:mmHeight44:1'
export QWS_MOUSE_PROTO='Tslib:/dev/input/event1'
export TSLIB_CALIBFILE='/etc/pointercal'
export TSLIB_CONFFILE='/usr/local/tslib/etc/ts.conf'
export TSLIB_CONSOLEDEVICE='none'
export TSLIB_FBDEVICE='/dev/fb0'
export TSLIB_PLUGINDIR='/usr/local/tslib/lib/ts'
export TSLIB_ROOT='/usr/local/tslib'
export TSLIB_TSDEVICE='/dev/input/event1'
export TSLIB_TSEVENTTYPE='H3600'
export QT_PLUGIN_PATH='opt/Qtopia4.4.3/plugins:/opt/Qtopia4.4.3/qt_plugins/'

我照打试了2遍,错误依旧。不会制作脚本文件啊。
---------
有个问题再请教,我在UBUNTU生成的hellowrld,要用哪儿交叉编译器版本生成?才能在开发板上运行?或则和交叉编译版本是无关的。

yulutong 发表于 2011-8-1 09:27:52

用论坛里下的“Helloword.tar.gz” 解压后把Helloword 拷到SD卡再挂载的开发板的/tmp/sd下运行,报错
./Helloword: line 4: syntax error: ")" unexpected

yulutong 发表于 2011-8-1 13:24:35

回复 5# 飞凌-fatfish
斑竹,我的环境是这样,用论坛上下的文件系统。OK6410_mouse_v1.0.cramfs,其它所用的SD卡一键烧写都是官方论坛上下的。
装了QTopia4.4.3+tslib
接着把helloword.tar.gz,解压后到开发板,打上环境变量后运行出现了 -/bin/sh: Helloword: not found
    我搜索坛子里问题都没有的到解决。
你能不能写个教程?
包括环境变量脚本制作
脚本怎么使用

非常感谢!

Tempest 发表于 2011-8-1 14:54:38

yulutong 发表于 2011-8-1 15:48:23

TNND还是不是,环境变量敲了2遍。
Tempest,你是手敲的,还是用脚本?
另外我开发板上是Qtopia,没有4.4.3,怎么和你不一样?

yulutong 发表于 2011-8-1 16:07:17

回复 9# Tempest
你是QT是自己移植的还是飞凌FORLINX_6410_mouse_v1.0.cramfs 这个文件系统?
我的开发板/usr/local路径下并没有tslib这个目录。。。。
另外手册上最后一句环境变量是怎么写的?
export QT_PLUGIN_PATH='opt/Qtopia4.4.3/plugins:/opt/Qtopia4.4.3/qt_plugins/   只少个单引号吗?

问题比较多,还的拜托你了,小弟我郁闷死了。

飞凌-fatfish 发表于 2011-8-1 16:29:29

哦,这里有下载
http://bbs.witech.com.cn/thread-3809-1-1.html

yulutong 发表于 2011-8-2 07:36:17

回复 12# 飞凌-fatfish


    下载什么?

yulutong 发表于 2011-8-2 07:53:08

Tempest你不能把你的helloworld给我下,我试试能不能运行你编译的。
我把编译出来上传上来,你帮我验证下。我想排除是我编译出来不对,还是别的原因。


飞凌-fatfish 发表于 2011-8-2 08:41:31

如果需要运行qtopia4.4.3的库的应用,需要4.4.3库的支持。如果你的文件系统中没有这个库,是无法运行应用的。

Tempest 发表于 2011-8-2 08:46:20

Tempest 发表于 2011-8-2 08:47:13

Tempest 发表于 2011-8-2 08:49:47

Tempest 发表于 2011-8-2 08:53:45

yulutong 发表于 2011-8-2 09:14:45

回复 19# Tempest
谢谢,我用的是FORLINX_6410_mouse_v1.0.cramfs 直接一键烧写了。估计问题在这里,没有QT4.4.3库的支持。
我接下来按你的方法试试。
页: [1] 2
查看完整版本: QT的helloworld,用make时出现了:make 没有什么可以做的为'first'