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.
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.
- Then, the two files under gcc/bin are gcc g ++, which is more convenient
- Next, modify the. profile in the home directory and add the following lines.
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