Want to run C/C++ programs on your Android Mobile
Want to know programs you took for copying in your college practicals run correctly. :p
Well now we have a solution on this.
Want to know programs you took for copying in your college practicals run correctly. :p
Well now we have a solution on this.
C4DROID – C/C++ Compiler for Android mobiles!
Well C4droid is a simple C/C++ IDE + C/C++ compiler for Android with Makefile support.C4droid already has almost full C language support, so you don't need to wait when it will be added.
You
can to write your own applications on 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
Compiling C++ projects:
Some components of C4droid are LGPL-licensed. You can download used source code of TCC and uClibc on their websites
Download: https://play.google.com/store/apps/details?id=com.n0n3m4.droidc |
Compiling C++ projects:
- Make sure you have Enough internal memory.
- Install GCC plugin (C4droid will ask you to install it).
- Select G++ compiler in C4droid preferences.
- Use iostream, not iostream.h
- Add “using namespace std;” to your program (before int main)
- 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)
- To compile SDL/NativeActivity/Qt apps, you need GCC/G++ compiler selected (TCC is not supported).
- So First Install “GCC plugin for C4droid” from Google playstore.
- Now install “SDL plugin for C4droid“. Once you have installed both the plugins, you can now compile SDL/NativeActivity/Qt apps
- Make sure while compiling, GCC/G++ compiler selected is selected as TCC is not supported.
- SDL is detected with #include “SDL.h”, NativeActivity is detected with #include “android_native_app_glue.h”, Qt is detected with #include “QtGui”.