Question:
do cygwin and mingw use the same compiler?
darthdudey
2011-01-17 16:40:28 UTC
its important because i need the same compiler as my university so they can mark assignments. but i have mingw and they use lynix with g++ but recommend cygwin for windows users
Three answers:
Scott H
2011-01-18 09:00:23 UTC
The compiler in MinGW and Cygwin are the GCC compilers. Which, are also the same compilers that can be installed with all distributions of Linux. You may have slight version differences between the three platforms, but it shouldn't pose any real compilation problems.
husoski
2011-01-17 17:53:54 UTC
They use different ports of the same compiler--meaning they compile the same languages and provide the same extra features, but don't produce the same executable code. MinGW binaries are standalone native Windows exe files, while Cygwin produces Unix-like binaries that need a runtime file (cygwin.dll) to translate those calls to Windows equivalents.



Either one produces exe files that will run on any Windows system, but you can't mix object files or libraries between the two. Probably, you don't mix source files too much either, unless they are pure standard C/C++, or at least OS-neutral. A Cygiwn app would be written as if it were running on Unix or Linux. A MinGW app is written for a Win32 platform.
PleaseInsertACoin
2011-01-17 16:44:13 UTC
mingw IS a compiler- or better, it's the gnu compiler collection for windows.

Cygwin is a compiler/ uses a compiler? news to me. I thought it's just a set of tools for compatibility between windows with UNIX stuff.



Yeah it's a set of GNU tools. I was just saying that mingw is (pretty much) a compiler, while cygwin includes a bunch of other things.



Seriously- if your professors want to teach LINUX/UNIX/POSIX stuff, you could just try to install Ubuntu on your PC or boot it from disk. No harm there, except you lose a bit of disk space.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...