Since you're asking on android-porting, I assume you are doing this as a platform build, not using NDK.
You should build command-line executables using a standard platform Android.mk rather than explicitly naming the compiler. Look in frameworks/av/media/mediaserver/Android.mk for an example of a command line executable (although it is complicated). It's possible /sdcard does not support execution. In that case copy to another filesystem and make sure you chmod +x. On Thursday, June 27, 2013 1:56:15 AM UTC-7, ramya mohan wrote: > > Hi Punith, > > Try building it as a static binary.. > > Use : arm-none-linux-gnueabi-gcc app.c -o app --static. > > Mostly it should work. > > Regards, > Ramya > > > On Wed, Jun 26, 2013 at 4:08 PM, Puneet B <[email protected] <javascript:> > > wrote: > >> i have written simple application code , >> >> 1>vi app.c >> >> #include<stdio.h> >> main() >> { >> printf("hello world\n"); >> } >> >> 2>arm-none-linux-gnueabi-ggc app.c -o app >> >> 3>i copied app binary file to sd card. >> >> 4>./app >> once i run this >> ./app No such files or directory. >> >> but which is working in debian rootfs. >> >> kindly tell me >> how to compile simple C code in android. >> i am using A10 armv7 board >> >> Thanks >> Punith >> >> >> -- >> -- >> unsubscribe: [email protected] <javascript:> >> website: http://groups.google.com/group/android-porting >> >> --- >> You received this message because you are subscribed to the Google Groups >> "android-porting" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > -- -- unsubscribe: [email protected] website: http://groups.google.com/group/android-porting --- You received this message because you are subscribed to the Google Groups "android-porting" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
