C4droid is a C/C++ compiler for Android.
C4droid already has almost full C language support, so you dont need to wait when it will be added.
You can to write your own applications on the Android phone, and run them. This app uses TCC and uClibc, so it has full support of ANSI C and some support of ISO C99. C4droid can be used for educational purposes or to practice in 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) C4droid includes Android Terminal Emulator so you can to run your application comfortably.
To get C++ support you need:
0) Install C4droid, launch it and wait for unpack.
1) Install GCC plugin for C4droid from Android Market.
2) Launch GCC plugin for C4droid and press install to internal memory (or to external if you have root rights)
3) Select G++ compiler in C4droid preferences.
4) Use iostream, not iostream.h
5) Add using namespace std; to your program (before int main)
Also C4droid supports SDL/NativeActivity 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)
Quick manual:
If you have found a bug or app is not working, email me.
If app crashes on start, check that enough internal memory is available (not 64Kb).
Root is not required, but if you have enough internal memory OR you have rooted your device, you can get C++ support, read further. (some comments about iostream not found are fake, their authors just didnt follow installation instructions).
Long click save button to save as, long click run to run with arguments.
Result of compilation (binary) is placed in /data/data/com.n0n3m4.droidc/files/temp, because sdcard doesnt have permission for execution by default.
If you have Illegal instruction error, using internal compiler (TCC), install GCC plugin, GCC supports softfloat (by default).
Updating from lower than 3.0 versions:
WARNING! Uninstall this app before update! Else app will crash. Its well known Android bug (details: http://code.google.com/p/android/issues/detail?id=1227 ).
You have been warned!
WARNING! All Telechips and MediaTek based devices are unsupported (Android phones/tablets from china), because of the incompatiblity with EABI. Devices without VFP (VIA) are partially unsupported too (floating point operations).
C4droid will check license via the Internet.
Report bugs at n0n3m4@gmail.com.
More info and Screenshots from Google Play
Plug-in version of GCC for C4droid 4.7.1:
You can skip to the end and leave a response. Pinging is currently not allowed.
Tidak ada komentar:
Posting Komentar