C4droid - C/C++ compiler & IDE

C4droid - C/C++ compiler & IDE


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:
- Fully-functional C++ compiler, almost complete C++11 support with GCC compiler
- 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 [email protected]

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.

Recent changes:
4.99:
Bugfix release.
Qt Android 5.1 workaround.
Added mouse wheel support.
4.98:
Bugfix release.
4.97:
License check now checks if Google servers are working properly (surprisingly it is required sometimes). Sorry for any inconvenience.
4.96:
Debugger bugfix.
4.95:
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
Add to list
$2.99
94
4.7
User ratings
2053
Installs
10,000+
Concerns
0
File size
2634 kb
Screenshots
Screenshot of C4droid - C/C++ compiler & IDE Screenshot of C4droid - C/C++ compiler & IDE Screenshot of C4droid - C/C++ compiler & IDE Screenshot of C4droid - C/C++ compiler & IDE Screenshot of C4droid - C/C++ compiler & IDE Screenshot of C4droid - C/C++ compiler & IDE Screenshot of C4droid - C/C++ compiler & IDE Screenshot of C4droid - C/C++ compiler & IDE Screenshot of C4droid - C/C++ compiler & IDE Screenshot of C4droid - C/C++ compiler & IDE Screenshot of C4droid - C/C++ compiler & IDE Screenshot of C4droid - C/C++ compiler & IDE Screenshot of C4droid - C/C++ compiler & IDE Screenshot of C4droid - C/C++ compiler & IDE
About C4droid - C/C++ compiler & IDE
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:
- Fully-functional C++ compiler, almost complete C++11 support with GCC compiler
- 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 [email protected]

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.

Recent changes:
4.99:
Bugfix release.
Qt Android 5.1 workaround.
Added mouse wheel support.
4.98:
Bugfix release.
4.97:
License check now checks if Google servers are working properly (surprisingly it is required sometimes). Sorry for any inconvenience.
4.96:
Debugger bugfix.
4.95:
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
Android Market Comments
A Google User
Jun 14, 2015
Awesome Works well for beginners or pros, alike.
A Google User
Jun 9, 2015
Any support for additional libraries? Hai, i've good time with c4droid, many thanks. I would like to have additional libraries such as sqlite or maybe glib, is it possible?, how to compile it?, do you provide official repository for additional libraries? Edit: Already compile sqlite3 on c4droid by selecting build a library under compile options, sorry for my ignorance.
A Google User
Jun 8, 2015
When trying to compile the QT samples I am prompted to install Ministro2 (which I have), which then prompts me to install SDL extensions... which notifies me that I have an invalid version of QT. Edit: No, I am using Lollipop (5.0.2).
A Google User
Jun 8, 2015
It works. Well, #include commands work, but they only work with one compiler for some reason. I want to apologize to the developers if I seemed like I was outright bashing it without even using it. It's just a little unsettling when you just paid for an IDE that can't even run a Hello World program. For future users, I HIGHLY recommend you get the GCC compiler add on. The app becomes useful again once you do that.
A Google User
Jun 6, 2015
I've been waiting for such an application Ever since I found AIDE in the play store. I've been wanting something like this. Very excited to give it a go.
Version 1000000
Version 1000000