先看一段来自Cygwin官方网站上的关于Cygwin的介绍:
Cygwin is a Linux-like environment for Windows. It consists of two parts:
- A DLL (cygwin1.dll) which acts as a Linux API emulation layer providing substantial Linux API functionality.
- A collection of tools which provide Linux look and feel.
The Cygwin DLL works with all non-beta, non "release candidate", ix86 32 bit versions of Windows since Windows 95, with the exception of Windows CE.
What Isn't Cygwin? - Cygwin is not a way to run native linux apps on Windows. You have to rebuild your application from source if you want it to run on Windows.
- Cygwin is not a way to magically make native Windows apps aware of UNIX ® functionality, like signals, ptys, etc. Again, you need to build your apps from source if you want to take advantage of Cygwin functionality.
看到这里大家应该都明白了,:cygwin不仅有在Windows上模拟Linux的功能,也是移植Linux程序到Windows的一个很有效的工具(不仅如此,也有人用它来做嵌入式系统开发,只是没有前两个用途那么广泛)
大家可以到官方网站上下载到最新的版本,但是由于速度实在是慢(连接的是国外的FTP站点,其中有几个亚洲的站点,但是依然很慢),所以推荐大家去http://nc.onlinedown.net/down/Cygwin0528.rar下载,尽管不是最新的版本,但是各种功能都还比较完善了(唯一的较大的缺点是没有现在最新版本的可视化操作界面,但是随之而来的显著优点就是体积很小了,呵呵呵)
至于安装中唯一要注意的问题,就是在默认情况下,安装选项的都是Default,而很多工具的默认状态都是不安装。 所以要在All这一行上后面的Default上点Install,全部安装,以免出现不必要的问题。
至于使用,大家可以去Google上搜索了,同时Cygwin的官方网站也是一个很好的资源,各种文档可以说是应有尽有!
最后贴张图上来,是我用Cygwin中集成的gcc编译并运行的那天解决的S和P先生的谜题的程序的情况:
祝一路顺风,一起进步呵!