C4Droid- Run C/C++ Programs on your Android Smartphone

C/C++ are the most famous and premier programming languages used today. These languages have made a phenomenal growth and are very useful in educational purposes. Many of us use Turbo C like softwares on our pc for running C/C++ programs. You always cant carry your pc or laptop with you so as to run your C/C++ programs, but imagine if your Android Smart phone can run them..! Youll say hows it possible? C running on your android device! This is amazing! But its true, with C4Droid you can easily compile and run all your C/C++ programs on your Android Device just with a flick of finger.

This app will definitely save you from carrying your laptop. C4droid is a simple C/C++ compiler for Android. It comes with GNU Makefile, SDL and Qt support. You can create your own programs here and run them. As this compiler is offline you can run all the programs even without the internet access. This app uses TCC and uClibc (or GCC with Bionic libc with a plugin) and hence it has a full support of ANSI C and ISO C99.

Note: C4droid supports only those devices running on ARM processors and does not support the devices with Intel x86 or MIPS processors.

To get C++ support you need:

  • Enough internal memory
  • Root Rights
  • Install GCC plugin (GCC is a plugin for C4droid that allows compiling C and C++ source code).
  1. Download it from Here
  • Select G++ compiler in C4droid preferences.
  • Use iostream, and not iostream.h
  • Add “using namespace std;” to your program (before int main)
  • To compile any Makefile projects, open that file in the same folder with Makefile and to configure the current directory long press on Compile. As soon as you press ok, C4droid will automatically create .c4droid configuration file. Then just pressing compile button C4droid will build your project.
  • While doing so always enter the executable file name and also select the particular compile mode, else all the changes done will be discarded.
  • C4droid supports SDL, Native Activity and Qt for GUI. For using it you must install the SDL plug-in.

Note: For detecting SDL use #include SDL.h, for Native Activity use #include android_native_app_glue.h and for detecting Qt use #include QtGui.h.

  • For some devices the app will crash or force close sometimes. For that you must reboot your phone as it is just a Google play or Android bug.
  • While using internal compiler i.e. TCC if you get any illegal instruction error then you must use GCC plugin to overcome it.
  • Compilation results are placed in data/data/com.n0n3m4.droidc/files/tempas SDcard doesnt allow permission for executing the program by default.
  • For save as long press on save button while long pressing on run button will run the programs with arguments.

This app can definitely help the students in practicing C language.

Download C4Droid (Google play link)

Comments (8)
  1. mansoor October 4, 2014
  2. Pavan Yekabote October 2, 2014
  3. Sam Fisher June 29, 2014
  4. Anton Smirnov February 15, 2014
  5. Kishore Gupta December 22, 2013
  6. James Takac November 8, 2013
  7. Rushi July 8, 2013
    • James Takac November 8, 2013

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.