Installing C / C ++ Compilers on Android

Is there a way to have C/C++ compilers directly on an Android device?

Something like I can use the shell of the device and run gcc or agcc or something related to compiling C\C++ src files.

I googled, but there were only speculations, please help with this!

Thanks in Advance :) :) Shoaib

+8
compiler-construction android android-ndk
source share
2 answers

If you install c4droid, you can make an embedded executable by finding the gcc binary and invoking it. I also have root on my phone. On the phone or tablet: Install c4droid (paid application) and optionally GCC plugin (free). Install the terminal client. I use Better Term, but there are also free options.

find / -name gcc /mnt/sdcard/Android/data/com.n0n3m4.droidc/files/gcc/bin/arm-linux-androideabi-gcc

cat> test.c

 #include<stdio.h> int main(){ printf("hello arm!\n"); return 0; } 

./mnt/sdcard/Android/data/com.n0n3m4.droidc/files/gcc/bin/arm-linux-androideabi-gcc test.c -o test

./test

hello hand!

+3
source share

All Articles