Which C++ compiler to use?

I have Windows vista OS and i want C++ compiler to work with. Please suggest which one i can download ?
Well, Visual C++ 2010 is going to come out soon. Until then there's the beta and 2008.
Then there's also MinGW and Cygwin if you're into that sort of thing.
Cygwin gets my vote. :)
closed account (S6k9GNh0)
GCC itself gives bulky but flexible code. If your ever going to be going for the cross-platform application, GCC is usually the way to go since it's what you'll be using on other platforms.
Cygwin is fine but if your coding without the need of an iplementation of the POSIX interface, be sure to configure the compiler to disregard requiring Cygwin's library or else you'll have to carry it everywhere for literally no reason. Also, just because Cygwin attempts to implement the POSIX API, that doesn't mean code everything in POSIX and let Cygwin deal with it. Also, this is how much Windows cares about the POSIX API: http://en.wikipedia.org/wiki/Microsoft_POSIX_subsystem

MinGW doesn't require a library such as this and is rather simplified.


Visual C++ isn't its own language and I'm getting rather tired of saying this to be honest. Because it gives relatively slimmer code than GCC, most serious projects use both compilers, giving the user or developer who compiles it the option to choose.
And VC++ is not as convenient as some might bring it out to be. Since that's all they've ever used, they know all the bindings, little tricks and doodles, etc. It's not something to get super excited about, really. It is however, a full fledged compiler and IDE integrated nicely together. It outputs relatively fast and slimmed code for it's only platform (Windows).
Last edited on
Code:blocks w/ MingW and Visual C++.. i use both
Last edited on
Uh... Nobody said anything about Visual C++ being a language.
closed account (S6k9GNh0)
No but a lot of beginners assume that it is. Everyone I know in real life has probably asked me at least once about learning VC++.
Last edited on
Starting with Windows XP, the POSIX subsystem is not included as part of standard Windows distributions and has been replaced by Interix.


You should have followed the Interix link computerquip
Windows VC++ cl.exe compiler.

Here is an example of how you can use the cl.exe compiler in makefiles to compile and link, just like you would on any Linux/unix system.

http://codediaries.blogspot.com/2009/08/nmake-makefile-tutorial-and-example.html
As a number of folks have said, there are a few choices, and your choice should probably be based upon what you intend to write with it.

The views below are entirely based on my opinion based on a fair amount of experience. I've tried to distill what will help you to make the decision which is best for you.

If you intend to write applications Windows, the path of least resistance is to download one of the Visual Studio Express Editions which has VC++. This provides you with a relatively straightforward IDE with (obviously) good integration with the Windows platform. Particularly the visual debugger is something many find of great value whilst learning a language.

For *nix the GCC (GNU C/C++ compiler) suite with command line "make" to build your projects is the most standard development experience. This is a slightly strange kind of experience on Windows, to some degree, as the compiler itself is not simply a straight port to windows - and needs support functionality (as provided by Mingw and others), but does not interface to the Windows API in such a natural fashion as the MSVC experience (in my opinion). Your applications will effectively write against a unix compatibility layer. As other have mentioned - you can install Cygwin and have a more native feel there too - but then you have to get used to yet another tool.

Unlike the MSVC experience there is no standard GNU IDE, although there are many out there to suite many different users. Ecclipse is a popular one, as is Codeblocks. Both of these will also give you a visual debugger and a build environment. In my experience most *nix developers are not big fans of GUI development environments, preferring to stick to a number of excellent command line tools.

The GCC is generally one of the most standards conforming compilers around and keeps your code honest. Microsoft compilers have their own extensions (which can be disabled) which can lull you into a false sense of believing you have written portable code, but then if you're starting out - there will be so much to learn anyway, that portability can come later.

My suggestion is that if you're starting out on Vista - go with MSVC and learn to build some apps and do some programming. Then, when you're more comfortable with what you're doing - explore the alternatives if you intend to become a cross platform developer or a *nix developer.

I hope you enjoy the experience,
CC
Last edited on
closed account (S6k9GNh0)
mackabee, there are a few projects that do this actually but Microsoft themselves, (that I know of) do not support POSIX past POSIX 1.

EDIT: Never mind, the article says "support is provided by Microsoft for a fee or service contract". Didn't see that at first...
Last edited on
closed account (DSL6b7Xj)
I recommend that people take Standard conformance very seriously when considering a compiler. If you can, avoid any compiler that doesn't closely approximate the ISO standard or fails to supply a solid implementation of the standard library. The recent releases from all the major C++ vendors do that.

For more information visit http://www2.research.att.com/~bs/compilers.html
Support
Traditional support is provided by Microsoft for a fee or service contract, though released hotfixes can usually be obtained free of charge from Microsoft. Alternative, free support can be found with the forums at the SUA Community site[4] and with the FAQ


That's for the support.

http://en.wikipedia.org/wiki/Interix - This is their POSIX environment now
Last edited on
Well if you are really serious try actually buying a piece of software like Microsoft Visual Studio Professional 2008 or just wait for 2010 version of it and you could even have 64-bit Windows 7 development support. Otherwise just download something from above try it out and then download something else and try it out until you find one you like that works for you.
Topic archived. No new replies allowed.