MinGW and Cygwin – An Introduction and Differences

If you are using Linux and your are a big fan of shell and its other utilities like grep, ls, make and its compilers gcc and g++, and if you want these utils on Windows platform, then this articles is for you. Even if you are not a developer, but still want to explore some Linux based utilities on your Windows Machine, this articles is for you too. Or if you have just heard these names and and you have wondered what these are, then this article is for you also.

So what is all this fuss about MinGW and Cygwin? What it is? And most importantly why do I need it? So lets first take MinGW. MinGW stands for Minimalist GNU for Windows. This is a project for providing native GCC compiler for Windows platform. According to MinGW website:

MinGW provides a complete Open Source programming tool set which is suitable for the development of native MS-Windows applications, and which do not depend on any 3rd-party C-Runtime DLLs. (It does depend on a number of DLLs provided by Microsoft themselves, as components of the operating system; most notable among these is MSVCRT.DLL, the Microsoft C runtime library. Additionally, threaded applications must ship with a freely distributable thread support DLL, provided as part of MinGW itself).

It provides GCC, make, debugger etc which is necessary for developing on Windows platform. Along with it provides MSYS, which stands for “Minimal System”. It is a Bourne Shell command line interpreter which can be used as an alternative to cmd.exe present in MS Windows systems. It provides a selection of Unix tools like grep, ls, ps, whoami, pwd etc which facilitates your work as a developer.

Ok, that was MinGW. So what is Cygwin? It is a toolset, which can make you feel like if you are working on Linux platform. Let see what Cygwin website says about it:

Cygwin is:

  • a collection of tools which provide a Linux look and feel environment for Windows.
  • a DLL (cygwin1.dll) which acts as a Linux API layer providing substantial Linux API functionality.

So is it not a development environment? Certainly it is. If also has GCC tool-chain for compilation,debugging and make. It has more complete set of utilities which are present in Linux. So what is difference in these two?

Cygwin adds a Linux API layer to emulate Linux functionality. This also includes POSIX standards. But MinGW aims at providing a native GCC compiler for Windows platform. In case of utilities Cygwin tries to provide you a most complete set of Linux Functionality, while MinGW aims at providing minimalist Linux feel. Here comes one liner citing the difference:

Cygwin = Lets put unix on windows, use as much native unix stuff as possible
MingW = Lets keep unix out of windows as much as possible, us as much native windows stuff as possible.

If you are compiling your program with MinGW, then the generated
binaries can be distributed without any dependencies on external DLL.
While programs compiled with Cygwin need cygwin1.dll for running the
program. However POSIX is supported in Cygwin but not is the same case
with MinGW.

That’s all I have as of now on Cygwin and MinGw. If you want to download one or both of them, here is the place:

If you have used them, please share you experience with other users in comments below.

时间: 2024-10-10 23:35:26

MinGW and Cygwin – An Introduction and Differences的相关文章

MinGW与Cygwin的一些杂谈

引用:http://www.cnblogs.com/fancybit/archive/2012/07/08/2581590.html 首先MingW和cygwin都可以用来跨平台开发.  MinGW是Minimalistic GNU for Windows的缩写,也就是Win版的GCC.  Cygwin则是全面模拟了Linux的接口,提供给运行在它上面的的程序使用,并提供了大量现成的软件,更像是一个平台.  相对的MingW也有一个叫MSys(Minimal SYStem)的子项目,主要是提供了

mingw和cygwin区别

minGW与cygwin ========================== 首先MingW和cygwin都可以用来跨平台开发. MinGW是Minimalistic GNU for Windows的缩写,也就是Win版的 精简的GCC . MinGW 收集了一系列免费的Windows 使用的头文件和库文件:同时整合了GNU( http://www.gnu.org/ )的工具集,特别是GNU 程序开发工具,如经典gcc, g++, make等. Microsoft的有一套unix的子系统的开发

mingW与cygwin

转自:http://hi.baidu.com/ooxxer/item/d25dccc072846a50ac00ef7e# 首先MingW和cygwin都可以用来跨平台开发.  MinGW是Minimalistic GNU for Windows的缩写,也就是Win版的GCC.  Cygwin则是全面模拟了Linux的接口,提供给运行在它上面的的程序使用,并提供了大量现成的软件,更像是一个平台.  相对的MingW也有一个叫MSys(Minimal SYStem)的子项目,主要是提供了一个模拟Li

C/C++ 跨平台交叉编译、静态库/动态库编译、MinGW、Cygwin、CodeBlocks使用原理及链接参数选项

目录 0. 引言 1. 交叉编译 2. Cygwin简介 3. 静态库编译及使用 4. 动态库编译及使用 5. MinGW简介 6. CodeBlocks简介 0. 引言 UNIX是一个注册商标,是要满足一大堆条件并且支付可观费用才能够被授权使用的一个操作系统.linux是unix的克隆版本,是由其创始人Linus和诸多世界知名的黑客手工打造的一个操作系统.为什么linux和unix之间有很多软件可以很轻松的移植?因为linux也满足POSIX规范,所以在运行机制上跟unix相近.同时,POSI

Msys/MinGW与Cygwin/gcc

本文转自:http://www.lupaworld.com/273398/viewspace-122539.html 一. MinGW MinGW 官方网站为 http://www.mingw.org/ MinGW,即 Minimalist GNU For Windows(GCC compiler suite).它是一些头文件和端口库的集合,该集合允许人们在没有第三方动态链接库的情况下使用 GCC(GNU Compiler C)产生 Windows32 程序. MinGW: 一个可自由使用和自由

Cygwin、Msys、MinGW、Msys2的区别与联系(转)

声明:本文章转自知乎,如有侵犯,请告知删除. 作者:LiTuX链接:https://www.zhihu.com/question/22137175/answer/90908473来源:知乎 网上有很多文章讲它们之间的区别与联系,初学者看的一头雾水,在知乎上看到这篇文章讲的很清楚,容易理解. 在讲区别联系之前,我们先看一下这几个东东的前世今生. Cygwin,原 Cygnus 出品(已被红帽收购),目前是 RedHat 名下的项目.项目的目的是提供运行于 Windows 平台的类 Unix 环境(

cygwin和mingw的区别

之前由于做一些JNI的开发,安装了MinGW,最近有个项目需要用到cygwin,于是就有个疑问,这两个东西有什么区别?在网上看了些资料,在这里复制粘贴一下,以备后查. Unix下编译通过的C代码,在win32下编译是不能通过的 ,当然Unix 和win32的API都是符合标准C,也就是说,大多数函数调用在unix和win32下是相同的.但是,unix有自己一些独特的API(如fork,spawn,signals,select,sockets等),如果代码中使用了这些API,在win32下当然找不

Cygwin 与 MinGW/MSYS/MSYS2,如何选择?

本文链接:http://zengrong.net/post/1557.htm 什么是Cygwin和MinGW?请看这篇:Msys/MinGW与Cygwin/gcc. 在无法完全转换到Linux系统的前提下,我一直在 Cygwin 下工作,使用全套的Linux移植工具,学习Bash编程. 但Cygwin由于工作在模拟模式下,速度较慢,相比而言, MinGW 就要快不少. 下面是我选择的对比: 特点 Cygwin MinGW/MSYS MSYS2 是否GNU 否 是 是 更多软件支持? 支持绝大多数

Cygwin与minGW

这几天关注了一下它们, 其实我是不想安装一下vs来编写一些小东西. 本来想写个小exe,于是跑到vs的bin下面把cl与link搞出来,却发现cl还要配置什么的,也不太清楚直接就二个exe与部分dll能否使用.折腾二下, link可以使用,cl却不能使用.也没见谁这么弄过,于是放弃了. 再找window编译win32 c时,发现有gcc,找到minGW,与Cygwin,折腾比较了好大一会,才发现. mingGW最大区别就是把那些bin编译成cmd下可以独立运行的, 而Cygwin,基本上是cmd