Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running Cyanogenmod 7 on my Nexus One, and I wanted to compile and run LAME on my phone. I've already downloaded the source package and have tried to ./configure it, but I'm told that neither cc nor gcc exist on the phone. Is there a way to get gcc for Android? I'm simply looking to be able to compile a few native applications like LAME for use on my ARM device. How can I go about doing this?

share|improve this question
Is it necessary to compile on your phone, or would it be acceptable to compile for your phone? (in the second case, the executable is compiled elsewhere - on a PC perhaps - but compiled for the architecture of your phone) This could give you the basic idea: – Piskvor Sep 6 '11 at 16:08
I can't find a C compiler than runs on ARM, nevermind specifically gcc for Android. You're probably out of luck -- if gcc is ported it would probably take quite a while. – Matthew Read Sep 6 '11 at 16:13
up vote 2 down vote accepted

You can write, compile and distribute native code as an Android Application.

Look here for more info about the NDK.

If you want it done without the official framework and application packaging then you'll need to look into cross-compiling the application for the ARM architecture.

share|improve this answer
Err...that lets you use native code in your apps, not compile things on your phone, no? – Al E. Sep 7 '11 at 15:12
I know that Al. I never said that it was to compile it on the phone. – DarthNoodles Sep 7 '11 at 17:43
Yes, but that is what was specifically asked for (and another, duplicate question, was deleted). – Al E. Sep 7 '11 at 23:52

Compiling applications does not take considerable processing power in general. I did it on my 286 all the time. The OP wants gcc on his phone.

Look for C4droid (C/C++ compiler) in the Google market. Then install the "GCC plugin for C4droid" from the market. (These do cost a couple dollars).

From the market description: "It's a plugin for c4droid, that allows it to compile C and C++ source code using GCC. It contains gcc 4.7 with Bionic (Android libc). Source code hadn't been modified, so you can compile it yourself, if you want."

Here's another package that includes gcc from the market: "Debian Kit" -

share|improve this answer
It would be nice if you could provide the links to the apps. – Al E. Aug 3 '12 at 20:06

I can't understand why I have to pay $3 for c4droid as it's just GCC with editor. Use new free C/C++ IDE and compiler on Android. It has a lot of included C/C++ examples and tutorials. Blog link, Google Play link. You can also use CCTools as it's almost c4droid but free.

share|improve this answer

Android Applications are compiled in a PC and then installed on the phone. In order to compile an Application you will need a considerable amount of computational power and a compiler, in this case, a C compiler.

In other words, you need a Computer to compile the application.

You will need to download and install in your computer the Android SDK, the gcc compiler and other tools and then you will be able to compile the application for your phone.

share|improve this answer

The app Terminal IDE has a built-in GCC ARM compiler for Android. You can install it, move it to another folder and then uninstall it. But make sure you have enough free memory.

share|improve this answer

As an alternative, or if you wish to use 100% FOSS, you can install a native Linux installation on your device using apps such as Linux Deploy, and simply apt-get install gcc.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.