您的位置:首页 > 产品设计 > UI/UE

bin/sh: hello :not found 的解决方法

2010-12-18 14:05 495 查看
 奋战一个星期,终于把android的开啊环境建立起来,我的硬件开发环境是S5pc100的硬件开发环境,以第一个“Hello World”入门程序开始,兴奋之余却遇到bin/sh: hello :not found拦路虎,郁闷啊~~~网上说法云云,改了kernel,又改rootfs,瞎忙一通无济啊,还是被我发现了一些端倪:

Build Options->

Build BusyBox as a static binary (no shared libs)

Build with Large File Support (for accessing file>2GB)

如果选择 Build BusyBox as a static binary (no shared libs) 方式进行编译时,所需的库已经与程序静态地链接在一起,这些程序不需要额外的库就可以单独运行,但是自己编写的程序在文件系统上运行必须采用静态编译,否则会报诸如:bin/sh: hello :not found的错误。

静态编译如:

arm-linux-gcc –static hello.c –o hello

 

在开发板上直接./hello,便会有你要的惊喜~~~
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  build file android