Easy-to-develop C programs on Android

Source: Internet
Author: User

If you are based without a dedicated development Board practiced hand, then yourAndroidmobile phones can also develop mostCapplication, compile after installationCthe compiler. This article only writes aHello Worldthe running process. The advantages are:no need for Eclipse, no Android Source code, no android.mk, no need NDK 。 OneCprogrammers can use them very well.Android, you need a compiler and aadbto put the program inAndroidthe system.

1. Installationadb


sudo apt-get install android-tools-adb


2. Installing the cross-tool chain


sudo apt-get install Gcc-arm-linux-gnueabi


3.compilingHello Worldprogram


ARM-LINUX-GNUEABI-GCC hello.c-static


Note : This is a static link, otherwise the library file will not be found.

4.will bea.outpush toAndroidon


ADB push a.out/data/


5.RunHello World


ADB shell/data/a.out


Results:


$ adb shell/data/a.out

Hello world!

$

End: Here is just a Hello world, In fact, many programs can be developed in this area , such as framebuffer or whatever. To play with the Android There are a lot of things to be familiar with, various tools. If you use only one aspect, you can use the other as little as possible.

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.