views:

2582

answers:

2

What is the most commonly used (simplest) C / C++ compiler used on Windows when using the NetBeans IDE (6.7)?

I want to write (mostly) simple C programs. I have Cygwin installed but for some reason NetBeans doesn't like it. I'm getting a error from it and before I try to figure this out, I thought I should find and (if needed) configure a more popular one.

makeinfo: --fill-column arg must be numeric, not

nbproject/Makefile-Debug.mk'. Try makeinfo --help' for more information.

I believe I'm getting this error because I don't have make installed.

I've also found this stackoverflow post (C/C++ Compiler for windows) but and that suggests to use MinGW compiler tools.

What is the difference between MinGW and Cygwin? Which is better or preferred? and are there any other options?

+3  A: 

The difference between Cygwin and MinGW is the the Cygwin tools (and the executables generated) rely on the cygwin DLL that provides a POSIX-like layer for the application.

MinGW are native Win32 tools (in that they do not require the presence of the Cygwin DLL) that produce native Win32 executables that do not need the Cygwin DLL.

My personal preference is for MinGW, but if you're going to be building programs that have a Unix heritage, the Cygwin toolset will likely help you build the program to run on Windows more than the MinGW toolset will.

I'm not sure what the licensing implications of linking to the Cygwin DLL are (I forget if it's GPL or LGPL).

Michael Burr
But these are my own two options? I just found this and it seems to support my conclusion... http://www.netbeans.org/community/releases/67/cpp-setup-instructions.html#compilers
Frank V
Also, that same links seems to indicate that the two can not coexist. Do we know if this is just a warning or if there is a practical reason for this?
Frank V
I can't really speak to this, but I'll make a guess anyway - I suspect that you could have both MinGW and Cygwin tools installed, but you'd have to be very careful that the paths for executables, libs (and probably headers) configured for the NetBeans projects used one or the other and didn't mix them. I would certainly suggest starting out with only one or the other to reduce the possiblity for problems (and to simplify diagnosing any problems that do occur).
Michael Burr
+1  A: 

Here is a good post I just found for getting cygwin and Netbeans working together.

Configuring cygwin with netbeans in Windows

And just so you know, cygwin and MinGW are by far the two most popular open source solutions for C/C++ on windows. Other popular compilers exist, but are not free (Borland C++, Microsoft Visual C++, etc)

James
Thank you for the link but I had gotten it working earlier. I was simply missing make. I didn't install it because I had thought that I wasn't going to be using make files. Long story short, I originally installed Cygwin for another purpose.
Frank V
For the sake of argument, there is both a free version of MSVC(PP) and Borland CPP.
Christian Sciberras