C4droid - C/C++ compiler & IDE

C4droid - C/C++ compiler & IDE

10,000 - 50,000 downloads

Add this app to your lists
C4droid is a user-friendly (but powerful) C/C++ IDE + C/C++ compiler for Android.
Basic features:
- Offline C compiler: create your own applications on Android device and run them even without Internet access
- Source code editor with syntax highlighting, tabs, code completion, code formatting, file association and infinite undo/redo
- Export&share your programs as APKs or native executables (for terminal apps)
- No root required (but C4droid can use it for your programs if you want)
- Full ANSI C and ISO C99 support with TCC (Tiny C Compiler) + uClibc
- Customizable GUI, choose where to place tabs and buttons by yourself, themes are also supported.
More features with a free GCC plugin:
- Full C++ and almost complete C++11 support with GCC + Bionic libc
- NativeActivity, Qt, SDL and SDL2 support for GUI
- The most recent version of GCC always available
- Makefile support: use the same build scripts as on your PC (BusyBox is included)
- Semi-automatic open-source library porting feature for enhanced programming & education

C4droid is designed to be user-friendy out-of-the-box, but nothing is perfect, so here are some answers for questions that can appear:
How to install C++ support?
C4droid will ask you to install C++ support at first startup and will configure itself in semi-automatic mode.
If you want to do that manually, you need:
0) Enough internal memory OR root rights. C4droid does not require root rights for devices with more than 50MB of free internal memory.
1) Install GCC plugin (C4droid will ask you to install it).
2) Select G++ compiler in C4droid preferences.
3*) Add "using namespace std;" to your program(before int main), use iostream, not iostream.h
Note that if you want to use C4droid as a C compiler, it is better to select GCC, not G++.

How to use SDL, SDL2, NativeActivity and Qt in single-file mode?
Just install SDL plugin and select G++ compiler in C4droid preferences.
Note that C4droid chooses app mode using a very simple source code analysis:
SDL is detected with #include "SDL.h", SDL2 is detected with #include "SDL2/SDL.h", NativeActivity is detected with #include "android_native_app_glue.h", Qt is detected with #include "QApplication"
If you are compiling a single-file Qt app, you must add #include "yoursourcefilenamewithcpp.moc" to the end of source code file also.

How to use Makefiles, multifile projects, etc?
Long-click compile button (or select "compilation settings" if buttons are hidden/moved) and configure current directory to use the mode you want.
Note that C4droid will create .c4droid configuration file when you will press Ok. Some modes (like makefile) require to enter result executable file name, don't forget to do that.
After doing that all use compile and run buttons to build and run your app as regular.

How to build and install libraries?
Almost the same way as regular Makefile building except for that most probably some patching may be required.
Currently tested libraries are gmp(internal memory only),mpfr,mpc,libxml2,neon,sqlite,SDL_gfx(--disable-mmx required).

Which gestures/keyboard shortcuts does C4droid support?
Long-click gestures:
Save button: save as.
Open button: recent files.
Run button: run with arguments.
Compile button: configure current directory.
Tab: close tab.

Keyboard shortcuts:
Ctrl-C, Ctrl-V, Ctrl-X for Copy, Paste and Cut
Ctrl-S, Ctrl-O for Save/Open
Ctrl-Z, Ctrl-Y for Undo/Redo.
Ctrl-L for "go to Line"
Ctrl-F for Find
Ctrl-A for select All
Ctrl-B for Build/compile
Ctrl-R for Run
Ctrl-Space/Ctrl-D for autocompletion (Ctrl-Space may be reserved by Android)

Report bugs at n0n3m4@gmail.com.

C4droid stands for "c for android" (or "c++ for android"), but it doesn't actually contain an Android trademark.
C4droid is not an online compiler, so it uses real binaries.
Some binaries in APK are licensed under (L)GPL, email me for the source code (Tiny C compiler, GCC, BusyBox, etc.)
Android is a trademark of Google Inc.
Qt is a registered trademark of Digia.

Tags: c4droid, c4droid c c compiler, c4droid chomikuj, c4droid (c/c compiler), c4droid c c compiler apk, c4droid (c/c compiler) apk, c compiler, c4droid full скачать, c4droid full, gcc plugin for c4droid.

Recently changed in this version

Email me if app won't work after update.
If app crashes after update, reinstall it (it's an Android OS bug)
Fixed APK export bug.
Added x86 support.
Added side menu support.
Updated GCC to 4.8.2
Updated Qt to 5.2.0, warning Qt 5 is not compatible with Qt 4. (!Reinstall Ministro II app to get it working!)
Updated SDL to 2.0.1, SDL_GL_SetAttribute( SDL_GL_CONTEXT_MAJOR_VERSION, 1) is now required for OGLES1.
Updated icon.
Fixed APK export.

Comments and ratings for C4droid - C/C++ compiler & IDE
  • (77 stars)

    by Anton Smirnov on 11/02/2014

    Хакерская тулза по виду. Рекомендую CppDroid - https://play.google.com/store/apps/details?id=name.antonsmirnov.android.cppdroid

  • (77 stars)

    by Preeti Khare on 29/06/2014

    Loving it

  • (77 stars)

    by Stan Laurel on 26/06/2014

    I install gcc plugin and I changed the compiler to g++ and I still can't use "cin" and "cout" it always says "cin was not declared in this scope " pleas fix it and i will rate 5 ★. thank you issue solved .5 ★.

  • (77 stars)

    by jerry mori on 24/06/2014

    Absolutely Super Marvelous!!!!

  • (77 stars)

    by richard fryer on 19/06/2014

    Love this app, only problem is when pressing delete twice the cursor jumps to the beginning of the code, please fix this.

  • (77 stars)

    by Petroklos F. on 15/06/2014

    Easy to use with no problems or random errors. Has crashed only when I've overloaded it with random crap. For the best experience, pair it with the (free) "Hacker's Keyboard", available on the store. Believe me it'll make using this program much smoother and enjoyable than with the stock keyboard. 5/5, I don't regret buying it at all.

  • (77 stars)

    by Dallas DeBruin on 13/06/2014

    Wow, This app fulfills everything I wanted for android and more. I recently really got into sdl 2.0 programming and C++ for android. This is so much easier than downloading the ADT, SDK, NDK too-chains just to compile for android. I payed the $3 without any reservations whatsoever. I was willing to pay even $8. (don't raise the price please ;). Anyways, thanks for the app. Maybe I could become a d