Cygwin vs MinGW vs MSYS2

1. Cygwin

Cygwin is:

  • a large collection of GNU and Open Source tools which provide functionality similar to a Linux distribution on Windows.
  • a DLL (cygwin1.dll) which provides substantial POSIX API functionality.

Cygwin is not:

  • a way to run native Linux apps on Windows. You must rebuild your application from source if you want it to run on Windows.
  • 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 提供一个cygwin1.dll,它模拟了一些POSIX 的API,因此可以让你在Windows上对以前linux中的代码重新编译后,链接cygwin1.dll后,就能在Windows下运行了。

2. MinGW

MinGW (“Minimalist GNU for Windows”), formerly mingw32, is a free and open source software development environment to create Microsoft Windows applications. MinGW includes a port of the GNU Compiler Collection (GCC), GNU Binutils for Windows (assembler, linker, archive manager), a set of freely distributable Windows specific header files and static import libraries which enable the use of the Windows API, a Windows native build of the GNU Project’s GNU Debugger, and miscellaneous utilities.

MinGW 是GNU的一些开发工具,例如GCC等在Windows上的移植,提供了一套Windows上的开发环境。

3.MSYS2

MSYS2 is a collection of tools and libraries providing you with an easy-to-use environment for building, installing and running native Windows software.

It consists of a command line terminal called mintty, bash, version control systems like git and subversion, tools like tar and awk and even build systems like autotools, all based on a modified version of Cygwin. Despite some of these central parts being based on Cygwin, the main focus of MSYS2 is to provide a build environment for native Windows software and the Cygwin-using parts are kept at a minimum. MSYS2 provides up-to-date native builds for GCC, mingw-w64, CPython, CMake, Meson, OpenSSL, FFmpeg, Rust, Ruby, just to name a few.

The unixy tools in MSYS2 are directly based on Cygwin, so there is some overlap there. While Cygwin focuses on building Unix software on Windows as is, MSYS2 focuses on building native software built against the Windows APIs.

MSYS2 是Windows下的一套开发环境,用来编译程序。它的很多工具,例如命令行程序(terminal )、版本控制程序、tar、awk(类linux程序)等,这些都是基于Cygwin开发的,但是呢又保持了最小的依赖。所以,MSYS2和MinGW作用是类似的,用来开发原生的Windows程序,但MSYS2中有些工具是基于Cygwin开发的,MSYS2 是用于辅助 MinGW 进行开发的配套软件包。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值