Use gcc on android

Source: Internet
Author: User

The simplest method:

First download a GCC Plugin for C4droid

Official: https://market.android.com/details? Id = com. n0n3m4. gcc4droid

Or this address, thanks to the Oxt provided (ps: Online Search): http://115.com/file/bhtwhm5k# com.n0n3m4.gcc4droid-1.apk

I uploaded this (gcc.zip, that is, the file): http://115.com/file/belmf820 #

Then, you can extract the gcc.zip file from the wintab. Because GCC is free of charge, and the GCC clause allows us to use it legally. That is to say, we are not doing anything to steal chickens and touch dogs. Alternatively, open the file in LINUX and decompress it. The method is the same, as on MAC.

  1. adb remountadb shelladb push gcc /sd-ext/home/gcc


    That is, put the file somewhere on the mobile phone. Because the file is used as the HOME directory, it is also the gcc directory.

  2. Then, the two files under gcc/bin are gcc g ++, which is more convenient
  3. Next, modify the. profile in the home directory and add the following lines.
  4. export GCCHOME="/sd-ext/home/gcc"                                               export GCCPATH=$GCCHOME/bin:$GCCHOME/arm-linux-androideabi/bin:$GCCHOME/libexec/export PATH=$PATH:$GCCHOME:$GCCPATH ]

Try to write hello. c and run it. That is, the legendary android gcc.


For the android bash method, the built-in terminal uses sh instead of bash. Therefore, we can use this method to attract more people.

: Http://115.com/file/belm038k #

The method is to push to those files, and then OK.

The same is true for using python on Android. Apart from some differences in. profile, the file is pushed to the home directory.

Search for sl4a,: code.google.com/p/android-scripting/

export PYTHONHOME="/sd-ext/home/usr/python2.6"export PYTHONPATH=.:$PYTHONHOME:$PYTHONHOME/site-packagesexport PATH=$PATH:$PYTHONHOME:$PYTHONPATH

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.