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

 奋战一个星期,终于把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,便会有你要的惊喜~~~

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值