LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 724|回复: 1

嵌入式系统中为什么不能识别我的应用程序?

[复制链接]
发表于 2007-11-27 15:27:36 | 显示全部楼层 |阅读模式
嵌入式系统中为什么不能识别我的应用程序?


在arm板上测试自写程序的问题

本机上写了一个没实现任何的c程序
//test.c
    int main(){
        return 0;
    }
用交叉编译工具的arm-softfloat-linux-gnu-gcc编译一个可执行文件 hello  (下载到开发板上的kernel 和fs都是这个交叉编译工具编译的)
    arm-softfloat-linux-gnu-gcc -o test test.c

在本机上查看该文件
[root@localhost test_gpio]# file test
test: ELF 32-bit LSB executable, ARM, version 1 (ARM), for GNU/Linux 2.4.3, dynamically linked (uses shared libs), not stripped
[root@localhost test_gpio]#  

然后把生成的hello通过ftpget下载到板子上运行,错误如下
/app $
/app $ ls -l
test
/app $ ./test
-sh: ./test: not found
/app $  

为什么呢,把这个文件当做一个shell文件了??所以提示说无./test命令?  我需要怎样处理呢 ?
发表于 2007-11-28 01:57:41 | 显示全部楼层
ftpget ...
chmod +x test
./test
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表