Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to compile and run a C/C++ program on the Android system (like MinGW on the Windows)?

I want to compile and run the C/C++ program on the Android phone program (like G1).

For example, I write a "Hello World.c" program, then compile and run it on my Android phone system.

I have never used MinGW to run my code on my Windows system, so I also want to do it on the Android phone system.

like image 247
huaigu Avatar asked Sep 04 '10 08:09

huaigu


3 Answers

At the time of the other answers, it may have been true that there were no development options. However, that area is changing quickly. There are several projects now where you can develop in some languages. Not all utilities support all ansi standards of the languages yet. As an example the project C4droid seems to aim to give full ansi C/C++.

https://play.google.com/store/apps/details?id=com.n0n3m4.droidc&hl=en

like image 158
Open ids Are dumb Avatar answered Oct 02 '22 23:10

Open ids Are dumb


I'd recommend CppDroid - new free C/C++ IDE and compiler on Android. It has a lot of included C/C++ examples and tutorials. YouTube: https://www.youtube.com/watch?v=4T5qNP6xJ6Y#t=14 Blog: http://cppdroid.blogspot.com, Google Play: https://play.google.com/store/apps/details?id=name.antonsmirnov.android.cppdroid

like image 32
4ntoine Avatar answered Oct 02 '22 23:10

4ntoine


The only way of using C/C++ in Android is to use the Android NDK.

like image 42
Mark Ingram Avatar answered Oct 03 '22 00:10

Mark Ingram