An incomplete list of C++ compilers

I (Bjarne Stroustrup) am often asked to recommend a C++ compiler. However, I don't make recommendations; that would be too much like taking sides in commercial wars. Also, I don't know every C++ compiler; there are simply too many "out there". I use half-a-dozen C++ compilers on a regular basis, but that's only scratching the surface.

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.

If you are a novice and don't know how to see if a compiler is conformant, try this:

	#include<iostream>
	#include<string>

	using namespace std;

	int main()
	{
		string s;
		cout << "Please enter your first name followed by a newline\n";
		cin >> s;
		cout << "Hello, " << s << '\n';
		return 0; // this return statement isn't necessary
	}
If an implementation cannot handle this simple program as written, it is not a good candidate for learning Standard C++ (if you cut and paste, beware of html for "less than" in the #include directives).

To get an idea of current conformance, have a look at boost.org's compiler status page. Conformance is just one aspect of a compiler's quality (quality of generated code, error messages, compile speed, integration with tools, degree of support, and backward compatibility are examples of other important aspects), but conformance is an important one. Use of a supplier's language extensions and non-standard-conforming features limits the portability of your code and can prevent you from choosing a new implementation supplier.

Most of these compilers are embedded in frameworks of software development tools and libraries. These frameworks, environments, and libraries can be most helpful, but do remember that their use can lock you into a single vendor and that some uses have significant run-time performance implications.

When looking for C++ on the web, you find that much of the information is "hidden" under various product names. In fact, I had more luck finding C++ compilers using google.com than by going directly to vendors that I knew sold them. Here, I have chosen to list C++ implementations simply by the name of their provider, ignoring marketing labels.

Some compilers that can be downloaded for free (do check their conditions/licenses before attempting commercial use):

Some compilers that require payment (some allow free downloads for trial periods):

It is impossible for me to keep this list complete and up-to-date. The C++ world is just too large and too much new is happening. Apologies to those suppliers who I failed to list, I know there are some, and please, if you have a link that you think ought to be listed here, send me a message: bs at research.att.com. Again: I just list compilers, I don't endorse them. Also, there can be no one compiler that is best for everyone, people's needs differ too much for that.

Other lists of C++ compilers:

A filter to improve error messages from many compilers see STLfilt.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值