C4droid (C/C++ compiler)
You can create your own applications on Android phone, and run them (even without Internet access: compiler is offline). This app uses TCC and uClibc (or GCC with Bionic libc with a plugin), so it has full support of ANSI C and ISO C99. C4droid can be used for educational purposes or to practice in C/C++ language.
Some components of C4droid are LGPL-licensed. You can download used source code of TCC and uClibc on their websites (But TCC had been modified by me, so I recommend to email me to get modified source).To get C++ support you need:
0) Enough internal memory OR root rights.
1) Install GCC plugin (C4droid will ask you to install it).
2) Select G++ compiler in C4droid preferences.
3*) Use iostream, not iostream.h
4*) Add “using namespace std;” to your program (before int main)To compile Makefile projects, open any file in the same folder with Makefile and long-click “Compile” to configure current directory (C4droid will create .c4droid configuration file when you’ll press Ok). After configuring folder, you can press compile button and C4droid will build your project.
Don’t forget to enter executable name and select compilation mode (and press ok also, else changes will be discarded)
C4droid supports SDL, NativeActivity and Qt for GUI now, install SDL plugin for C4droid to use it (only GCC/G++ compiler is supported, so you need GCC plugin).
(SDL is detected with #include “SDL.h”, NativeActivity is detected with #include “android_native_app_glue.h”, Qt is detected with #include “QtGui”).
There is an experimental support for Qt using necessitas, but note that it’s in alpha stage.
Qt support limitations:
1) Path to Ministro libraries is hardcoded (/data/data/org.kde.necessitas.ministro/files/qt/lib), so email me if it will change.
2) If you’re compiling a single-file Qt app, you must add #include “yoursourcefilenamewithcpp.moc” to the end of file. If you’re using .pro file for compilation, you don’t need to do that.
If you have found a bug or app is not working, email me.
Long click actions:
Save button: save as.
Open button: recent files.
Run button: run with arguments.
Compile button: configure current directory.
Tab: close tab.
Result of compilation (binary or APK) can be exported using menu->export.
If you have “Illegal instruction” error, using internal compiler (TCC), install GCC plugin, GCC supports softfloat (by default).
C4droid will check license via the Internet.
Report bugs at firstname.lastname@example.org.
Some components of this app are licensed under (L)GPL, email me to get the source code.
Android is a trademark of Google Inc.
Qt is a registered trademark of Digia.
What’s in this version:
WARNING! 3.95 update will erase C4droid preferences (so some users may think that app is broken, but that isn’t true).
Email me if app won’t work after update.
If app crashes after update, reinstall it (it’s an Android OS bug)
Revert TCC update.
Finally fixed EditArea.
Updated GCC and SDL plugin.
Updated necessitas, Qt projects must be recompiled!
Added autocomplete feature: it is slow (very slow sometimes) but precise.