Is there any way to have C/C++ compilers
directly into the Android device ?
Something like I can adb shell the device and run gcc
or agcc
or something related to compiling C\C++
src files.
I googled, but there were just speculations, please help in this !
Thanks in Advance :) :) Shoaib
You can add C and C++ code to your Android project by placing the code into a cpp directory in your project module. When you build your project, this code is compiled into a native library that Gradle can package with your app.
Arguably the most popular mobile IDE for programming in Java and C++, AIDE is a huge coding suite aimed at programmers of all levels. It allows to create C/C++ NDK and Java/XML apps for Android, as well as pure Java console applications.
The GCC Compiler Plugin For C4Droid Android Application is available to download for Free on Google Play. You will get the link to Download GCC For Android at the bottom of this article. To Install GCC Plugin For Android Smartphone, you need to install two other plugins: SDL Plugin.
If you install c4droid you can make an onboard executable by finding the gcc binary and calling it. I also have root on my phone. On your phone or tablet: Install c4droid(paid app) and additionally GCC plugin(free). Install a terminal client. I use Better Term but there are free options as well.
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 arm!
Try C4droid https://market.android.com/details?id=com.n0n3m4.droidc or this app https://market.android.com/details?id=GDE.Main
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With