Chinaunix首页 | 论坛 | 博客
  • 博客访问: 15357825
  • 博文数量: 2005
  • 博客积分: 11986
  • 博客等级: 上将
  • 技术积分: 22535
  • 用 户 组: 普通用户
  • 注册时间: 2007-05-17 13:56
文章分类

全部博文(2005)

文章存档

2014年(2)

2013年(2)

2012年(16)

2011年(66)

2010年(368)

2009年(743)

2008年(491)

2007年(317)

分类: LINUX

2008-08-01 12:07:45

#include

int main(int argc, char *argv[])
{
    printf("hello android\n");
    return 0;
}

gliethttp@Leith:~/tmp/adb_test$ arm-none-linux-gnueabi-gcc -static -o hello hello.c
gliethttp@Leith:~/tmp/adb_test$ adb push hello /
343 KB/s (568231 bytes in 1.616s)
gliethttp@Leith:~/tmp/adb_test$ adb shell /hello
hello android
gliethttp@Leith:~/tmp/adb_test$
gliethttp@Leith:~/tmp/adb_test$ adb shell 登录到emulator
# /hello  执行根目录/下的hello程序,效果如下
hello android
#


ps:编译c或c++必须使用arm-linux-gcc-2.4.2或者以上版本编译器,否则不能在emulator中执行:)
阅读(1922) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~