Android Learning one: Cygwin introduction

Source: Internet
Author: User

To be able to get a glimpse of Android's underlying stuff, build an android-built environment. Although there are Ubuntu and SUSE systems, but always feel that in different systems cut to cut off is very inconvenient. Working in Windows Learning, to compile Android, you have to use heavy-duty software--cygwin.

N long ago, when the Qtopia, once a small use of a Cygwin, but at that time just use others set up a good environment, but they have never done. Recently repeatedly installed this Cygwin, is really cumbersome. If the installation is not complete, it is the download is not completely hung off. Write it down as a document.

I. Introduction of Cygwin

Cygwin is a UNIX simulation environment running on the Windows platform, the free software developed by Cygnus Solutions (the company has developed a lot of good things, famous and Ecos, but has now been Redhat acquired). It is useful for learning unix/linux operating environments, porting applications from UNIX to Windows, or doing some special development work, especially for embedded system development on Windows using the GNU toolset. For example, now develop, transplant qtopia,android.

The role of Cygwin software is to allow Windows to have software for unix-like environments. So, a compiler like GCC will naturally be included inside. However, for developers, Cygwin is a development environment. And for the user, Cygwin is a running environment.

Ii. mechanism of Cygwin

Cygnus first improved the development tools such as Gcc,gdb,gas, enabling them to generate and interpret Win32 's target files. They then transplanted the tools to the Windows platform. One scenario is to drastically modify the source code of these tools based on the Win32 API, which obviously requires a lot of work. So they took a different approach-they wrote a shared library (that is, cygwin.dll) and encapsulated Unix-style calls (such as fork,spawn,signals,select,sockets, etc.) that were not in the Win32 API, meaning , they wrote a mock layer of a UNIX system library based on the Win32 API. This way, you can use the cross-compiler on a UNIX host to build a toolset that can run on a Windows platform as long as the source code of these tools is connected to the shared library. Based on these porting to the development tools on the Windows platform, Cygnus is gradually porting other tools (almost without the need to modify the source code, only to modify their configuration scripts) software to Windows. This way, running bash and development tools and user tools on the Windows platform feels like working on Unix. For a more detailed description of the Cygwin implementation, please refer to http://cygwin.com/cygwin-ug-net/highlights.html.

Iii. Acquisition of installation packages

Cygwin's official website is http://cygwin.com. Domestic site for http://www.cygwin.cn. To install the network version of the Cygwin, you can go to http://cygwin.com or http://www.cygwin.cn, click "Install Cygwin now!". This will first download a GUI installer called Setup.exe, which can download a full cygwin. Follow the instructions on each screen to make the installation easy. You can also choose to download it locally and then install it (you can set it according to the Setup.exe option).

The official installation Guide can be consulted http://www.cygwin.cn/site/install/

Http://blog.csdn.net/netwalk/article/details/5026123

Android Learning one: Cygwin introduction

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.