Public Group

# 'Best' C++ compiler?

This topic is 4846 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I learned my c++ over turbo c , but for outside college I would like to use something better less MSDOS alike. Which was your experience with other compilers and which do you recommend?

##### Share on other sites
If you've got some money to burn, I'd go for Visual C++ .NET or wait for the new 2005 compiler by Microsoft. If you want something free, I'd go for GCC using either Code::Blocks or DevC++.

##### Share on other sites
The most cost effective compiler for Windows is MinGW which comes with the DevC++ frontend. As for the quality of the code I think you can do better with ICC from Intel. Microsoft has Visual C++, of course, but I think it is most useful for designing GUI-based applications, not games.

##### Share on other sites
Well, the canonical (mostly) cross-platform compiler is GCC. There's a port of it for windows (which includes other tools as well) known as MinGW, or Minimalist GNU for Windows.

If you want a Windows specific compiler, you might want to look at Microsoft's free Visual C++ Toolkit 2003

If what you want is an IDE, the new version of Eclipse and the CDT plugin work pretty well on all platforms. On Windows, Visual C++ Express Edition 2005 Beta 2 is a nice thing to get.

##### Share on other sites
jfclavette,

How functional is the free Microsoft Visual Studio download? I have one of the older Visual C++ releases (6.0 I think?). What was Microsoft's motivation for releasing that IDE for free? I love free IDE's like Eclipse (Java), but didn't expect Microsoft to offer something.

##### Share on other sites
Quote:
 Original post by SpaceRookHow functional is the free Microsoft Visual Studio download?

The IDE itself is fully operational and not crippled in any way. It only misses the MSDN part that is included in the retail package as well as the platform SDK (the latter can be downloaded for free from MS).
Quote:

The IDE isn't exactly "free" - it's a beta version, released to the public for testing purposes and to gather feedback. The retail version will come in various releases depending on what you want to do (liek express, standard, professional and enterprise). The express version will be very affordable (the current standard version of Visual Studio .NET 2003 is only about $100 as well) and only miss professional tools like the profiler. HTH, Pat. PS: Visual Studio 6 comes with a bad compiler that isn't very standard compliant, so you'd best not use it [smile]. #### Share this post ##### Link to post ##### Share on other sites Quote:  Original post by SpaceRookHow functional is the free Microsoft Visual Studio download? I have one of the older Visual C++ releases (6.0 I think?). What was Microsoft's motivation for releasing that IDE for free? I love free IDE's like Eclipse (Java), but didn't expect Microsoft to offer something. I just wanted to point out that virtually every company in the software development space gives away something free, and has since forever. More recent hot air and FUD likes to paint "freedom" (as in beer) as antithetical to many large companies, but even source code has been given away without restriction for, oh, three decades. MSDN has always given away tons of free source code. Even when purchased on CD as a companion to Visual Studio, all the samples were free to reuse, even though they were the copyright property of Microsoft. To complicate the central debate, you might want to also factor in the availability of top-notch learning resources and companion tools/utilities for your chosen compiler suite. While GCC is free, I find its documentation unnecessarily terse, and it's lack of robust GUI tool integration as a philosophical ideal counterproduction (for me; YMMV). Then again, I admit to being a Visual Studio snob: it was my first IDE, and I haven't seen any reason to switch to anything else. Again, YMMV. That it, in the 7.x and 8.x incarnations, is highly standards compliant, produces high-quality output and is supported by a staggering amount of documentation and libraries doesn't hurt. Essentially, "best" is, as I think your use of the quotation marks indicated you realize, a complex notion. The final choice of what's right for you depends on what you're trying to do, what platform you're trying to do it on, and what audience you're trying to do it for. If developing DirectX applications on Windows for Windows, go with MSVC. Spend the money. If building native Cocoa apps for OS X, Xcode + Information Builder (and, possibly in the near future, Rosetta) are your best bets. And so forth. Happy hacking. #### Share this post ##### Link to post ##### Share on other sites My$0.02:
I agree with Oluseyi; Visual Studio is one of the best suites out there. Search the documentation: you get nearly 500 topics for every word. Search the example code: you will find the complete source for NotePad+. My first compiler was DJGPP and when I moved to Dev-C++ it looked like a Godsend; when I moved to VS, that looked like a Godsend too. Point: If you have the money and are working on Windows, buy VS and you will be a very happy person.

##### Share on other sites
Determining the "best" compiler is difficult. Points to consider:

- Target platform supported - the types of executable that compiler is capable of making. This includes target CPU architecture and executable formats. It's possible to translate most compilers' output so that they can be used with an alien linker and/or libraries.
- Licence considerations (including price)
- Correctness / language feature support - some compilers can produce duff code, especially at higher optimisation levels. Also some compilers have incorrect or absent implementation of modern C++ features (by contrast, all C compilers are pretty much complete)
- Tool integration (e.g. debugger, IDE)
- Compilation speed (should not really matter unless your code is really big). Precompiled headers greatly increase compilation speed, but can also cause incorrect code generation if used incorrectly.
- Optimisation levels of the target binaries: some compilers are known to produce better / worse code for particular CPUs than others. Beware that this can vary between different CPUs of the same architecture too. It also depends on the code, so the only way you can really determine it is to test them all with *YOUR* code on your target hardware.

The latter (optimisation) matters little to most people, as their code will generally be pretty quick one way or another. The main people who care are the high performance scientific computing community. And this impacts their licencing considerations, because they're almost all academics who benefit from academic licences.

---

Historically, a lot of people think that gcc has had the best correctness, and Intel produced the most optimal code (for Intel processors, anyway). I don't really know myself.

Mark

##### Share on other sites
I prefer using MinGW as a C compiler oppose to microsoft's. I had a few nitpicks with .net. I did however like visual 6's compiler. As for an ide I would encorage C/cpp coders to use dev-cpp.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 31
• 16
• 11
• 10
• 12
• ### Forum Statistics

• Total Topics
634117
• Total Posts
3015601
×