Home c++ Mingw or Cygwin?

Mingw or Cygwin?

Author

Date

Category

Previously, simply compiled using G ++ on Ubuntu, pulling out the compiler using a batch manager:

$ sudo apt-get install g ++
$ G ++ -o Main.a main.cpp

or on Windows using a different IDE, inside which, as I was told, is Mingw.

Now I want to simply, using the inner console in the windows, compile natively for themselves. I read about Cygwin and about Mingw, I understood that the constant, what, but the gaps remained – it’s not entirely clear what I need.

Is it possible in detail, and it is better to find out about every opportunity to compile under the windows?


Answer 1, Authority 100%

Cygwin is an attempt to transfer UNIX environment in Windows, and Mingw (or a modern version of mingw-w64 ) focuses only on the GCC compiler .

Next, when compiling a program using Cygwin, under the terms of its license you will linked with its dynamic library cygwin1.dll and carry it everywhere behind yourself, while with MingW, you will depend on standard MSVC libraries (default from msvcrt.dll ).

Since Mingw is only a compiler, that is, a separate project – msys2 which supplies a lightweight / minimum version of UNIX Surroundings in sufficient volume to lead the development almost like UNIX (there is Bash , Git , curl , etc.). Moreover, utilities for MSYS2 are collected using MingW.

About the differences in Mingw from Cygwin can still be read:


Answer 2

Cygwin provides a POSIX interface

  • as at the system call level
  • and at the level of command line utilities

MSYS2 provides a POSIX interface

  • only at the level of the utility command line
Previous articleMIN / MAX PYTHON
Next articleImage in ImageView JavaFX

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions