Sign in to follow this  
cignox1

Cygwin and MinGW

Recommended Posts

Hi, I would like to know what are the differences between Cygwin and MinGW. From what I undertood, MinGW provides a unix-like compiling enviroment that lets me use make, gcc and other programs, while CygWin is very similar, but thus provides a run time library that emulates some unix funcs not present in windows (like signals and fork()). MinGW compiles native windows code from portable programs and the resulting exe doesn't need the presence of MinGW while CygWin lets you compile not completely portable code but the final exe needs a run time library of CygWin (you can avoid this by using a specific parameter with gcc). Did I undestand correctly? And a question: While running the shell of MingGW, an error says that it was not able to allocate the stack memory for CygWin. Note that on the same system Cygwin works. What can I do? Thank you!

Share this post


Link to post
Share on other sites
I'm pretty sure that MingW refers just to the compiler, gcc for windows, the shell distributed with it is technically MSYS. But that's just a technicality, I still understand what you're asking.

I've used both, and to me it seems that Cygwin is a complete unix shell emulation, it can even run a stripped down graphical desktop. MSYS is based on Cygwin IIRC, but is only the core necessities needed for development, whereas cygwin has a fancy update system and additional dependencies the average developer needs.

I'd recommend using MSYS/MingW unless you actually need Cygwin, I found that MSYS is more managable, whereas Cygwin was overkill for simple development.

Share this post


Link to post
Share on other sites
>>cygwin is a linux emulator.

Are you sure? I know it can compile linux code, but I'm not sure wether it can run linux programs...

>>I'm pretty sure that MingW refers just to the compiler, gcc for windows, the shell distributed with it is technically MSYS.

Yes, you're right...

>>I'd recommend using MSYS/MingW unless you actually need Cygwin, I found that MSYS is more managable, whereas Cygwin was overkill for simple development.

I thought the same, but I gen an error each time I run the shell... Does someone know why?

Share this post


Link to post
Share on other sites
I don't think cygwin can run linux executables (ELF format)

I could probably help you get msys running if you gave me a few more details about the error, does it occur when you try to start msys? what does it say/do?

Share this post


Link to post
Share on other sites
The error is:

C:\msys\1.0\bin\sh.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 6

It happens when I run the shell of Msys. After that, the shell closes.

I have WindowsXP Pro Service Pack 1. CygWin works correctly.

Share this post


Link to post
Share on other sites
Quote:
Original post by cignox1

Are you sure? I know it can compile linux code, but I'm not sure wether it can run linux programs...

Not even Linux can run arbitrary Linux executables, because unlike Windows, Linux works on several processor architectures, kernels, sets of libraries, etc and compiling a program for one of these doesn't guarantee it'll work for the others. This is why most Linux programs come as source that has to be built on your own computer and linked with whatever libraries you have. So, Cygwin is pretty close.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this