C4droid - C/C++ compiler & IDE

C4droid - C/C++ compiler & IDE


(4 stars)


Download for Android Like

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 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
- Git integration
- 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
- Debugger with breakpoints and watches
- 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").
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, c compiler, c4droid c/c compiler apk, c4droid full скачать, gcc plugin for c4droid, c4droid full.

Recently changed in this version

Bugfix release.
Qt Android 5.1 workaround.
Added mouse wheel support.
Bugfix release.
License check now checks if Google servers are working properly (surprisingly it is required sometimes). Sorry for any inconvenience.
Debugger bugfix.
Added debugger
Added git folder synchronization
Added run terminal option for advanced users
Added some themes and editor features
Added APK export resource support
Fixed Android L support
Updated Qt to 5.3
Updated GCC to 4.9.1

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

    by Anton Smirnov on 11/02/2014

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

  • (56 stars)

    by Matthew McIlree on 09/04/2015

    Been using this for almost a year with no problems. So useful, esp. for beginners like me to try out programs while on the go. Never written a review for any app before, but this is so good.

  • (56 stars)

    by Mehrzad Rezaei on 09/04/2015

    It's really user friendly & powerful!

  • (56 stars)

    by Eric Jorgensen on 07/04/2015

    the features are wonderful. I was really pleased to see how fast i could get something compiling. It does not work at all with the flesky keyboard, which is too bad because it is a great coding keyboard.

  • (56 stars)

    by Sami Mas on 01/04/2015

    great app. but how do you get it to work from and into files. where and in what format should text be saved? plus it is starting to show a weird message when debuging and after i run the program it say: "storage/emulated/0 $ " program runs successfully but this shows at the end. it did not use too.so i am afraid i screwed up with Prefrences. Is there a way to go to defult in Prefrences

  • (56 stars)

    by Peter Edwards on 01/04/2015

    I have tried out all the android C++ IDE's and this one is easily the best. I could get a lot of the QT 5 examples to work even the OpenGL ones. Also comes with a simple debugger. Author is also very helpful.

  • (56 stars)

    by Max Mansfield on 20/03/2015

    The first time I installed this and ran it everything worked great and I really liked it. That was on my Nexus 5 using Android 5.0.1 rooted with the Franco kernel. Now using stock Android 5.1 Qt and the extra SDL libs fail to install due to an invalid Qt version Otherwise it would be 5 stars.

More comments