views:

61

answers:

2

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.

A: 

Android does not have a C/C++ compiler on its devices, sorry. There are ways to create C/C++ libraries for use with Android (see the NDK), but those are compiled on a host machine, not on the device itself.

CommonsWare
oh,thank you! Can java be used in Android?
huaigu
@huaigu: http://developer.android.com/guide/basics/what-is-android.html
CommonsWare
+1  A: 

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

Mark Ingram