Comparison of the GCC native build environments under various windows

Source: Internet
Author: User
Tags gtk wxwidgets aliyun

http://i.rexdf.org/blog/2015/04/04/fa-xian-ge-xin-huan-jing-msys2/

Recently noticed a new Windows simulation Linux project above. In general, the two main camps MingW and Cygwin, the two ideas are different. Relatively mingw performance is better, as far as possible to replace the implementation with WINAPI. Cygwin is the addition of a layer that uses many DLLs to emulate Linux's syscall (typically, such as fork). Therefore, Cygwin programs are generally required to have Cygwin DLL in the path to run. MinGW disadvantage is that many programs can not be compiled, if not specifically designed for the MINGW program, basically MinGW is not compiled. The disadvantage of Cygwin is that it will be relatively slow.

Also note the environment variables. The MINGW environment variable path conversion is a bit more primitive and there are many cases of problems. Cygwin environment There is cygpath.exe this tool to convert back and forth (I used it to hack a bit under Cygwin Mintty can run call Nodejs Processing blog compression). In addition, the path of Cygwin is Unicode, and occasionally the directory is too deep, Windows Explorer and rd /s the long path files are not deleted, rm -rf can be easily deleted under Windows.

Msys was originally MinGW's basic shell environment, and has not been updated long before the MinGW project.

Msys2 is a completely different project. The following will give a detailed reference. Let's take a look at a comparison of the GCC native build environments under various windows.

To remind you before, most MinGW series are official website plus sourceforge.net hosted binary mode, so there are two main official websites.

Mingw/msys 1.0:

MinGW's official website is http://www.mingw.org/.

MinGW inside with a Msys 1.0, this is more classic, but too old, if you need GCC 3.4.4 with the GNU make 3.81 match. Many of the most recent GitHub and SVN checkout will fail to compile. Basically there is no other use other than learning Csapp (it is consistent with the example compilation results in Csapp). If you want to use the /bin/gcc antique gcc that is msys, because MinGW's path is /mingw/bin in /bin front.

MingW

It's still in the update. From http://sourceforge.net/projects/mingw/, the last update was December 2014. Estimated to be a patch for a package.

Mingw-w64

Official website http://mingw-w64.yaxm.org, the binary file official website http://sourceforge.net/projects/mingw-w64/.

Should be the follow-up of the MinGW. A typical download directory is http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/ mingw-builds/4.9.2/threads-win32/seh/, such a structure. Ideally, the best update is the version of Windows compiled from the Linux version of MinGW. This is the current regular pedigree of the MinGW project , although the building of Windows EXE and DLL files, but it is the ability to play the most on the Linux platform . support for win7/8/8.1 APIs. Be ffmpeg,gtk+,openssl,wxwidgets,perl,phreads,kde software collection,gimp,blender,the R Project for Statistical Computing and other items used in the project. But the Windows version of the various bugs it.

Mingw-builds

The abandoned official website https://code.google.com/p/mingw-builds/.

Binary file official website http://sourceforge.net/projects/mingwbuilds/.

It seems that the Russians have developed, and currently seem to stop developing, the existing release of GCC 4.6.2-4.8.1. Some of the feature are as follows (I don't know how to copy directly).

OpenMPLTOGraphitestd Thread support librarystd Atomic operations libraryNative TLS CallbacksWide-Character Startup (-municode)32-bit and 64-bit WindowsMultilib toolchainsCross-compiling from x86_64 for i686 and vice versa
Win-builds

The official website is http://win-builds.org/.

It needs to be attached to the shell environment of MinGW or Cygwin , and there is also a version under Linux. The latest is version 4.8.3.

This is relatively stable, with its integrated QT, Curl, EFL, FreeType, GTK +, Lua, OpenSSL, SQLite, wget, zlib ... Wait 92 libraries . Support for Windows and Linux, it feels like a good choice if you're doing development.

tdm-gcc

The official website is http://tdm-gcc.tdragon.net/.

This is a more personal and practical choice. It defaults to POSIX, which may cause some problems. But Wxwidgets's website recommended the compiler is it, another part of the people like the dev-cpp of the subsequent development version orwelldevcpp is also used it. It can be seen that the customization is reasonable.

The update is faster and the latest has been updated to 4.9.2.

Cygwin

This does not need to say here, the community is very active, e-mail will soon be answered. Software updates are also very frequent. Here mirror, except for 163. Ali also has mirror,http://mirrors.aliyun.com/, the speed will be relatively fast. But note that adding mirror is tricky. the first copy of the directory should http://mirrors.aliyun.com/cygwin not take the last one, followed by the addition of the first click on the / other, and then click on the newly added Ali to be able to manually change the other source is also the case.

Msys2

Official website Http://msys2.github.io may be in the current GitHub of a series of events related to the domestic cannot directly open. binary file official website http://sourceforge.net/projects/msys2/.

An introduction.

Two key github repo:

Https://github.com/Alexpux/MSYS2-packages

Https://github.com/Alexpux/MINGW-packages

If you want to compile from the source code can use his patch. In fact, the sourceforge.net above is compiled with his patch.

The other thing is that it uses my favorite ArchLinux pacman -Syu . It's not good enough. But a little bit small problem is need rebase, fortunately it is more than Cygwin automation, directly execute the root directory inside autorebase.bat can.

I found that there are a lot of things in GitHub that have not been seen anywhere else, such as Nodejs (the win version of Nodejs's official website will not find the correct directory under Cygwin's shell, and refuse to execute it directly. This causes many command line items that need to be nodejs to be compiled and used.

A domestic binary MIRROR:MSYS2 mirror uses the help.

Conclusion

Finally say the people are said to have a promising Flinux package management is based on Pacman, it seems that everyone is more like pacman .

Comparison of the GCC native build environments under various windows

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.