• What are the best C++ compilers?
    10 replies, posted
I'm new to C++, and I need to find a compiler so I can use my work. What are the best compilers available out there?
vc++ [editline]1st January 2011[/editline] and/or clang
Define "best" compiler? If you say "best" would be compiling speed, go for borland c++ compilers. If you say "best" would be multi platform availability and runtime speed, go for g++ If you say "best" would be simple click and run.. go for the Microsoft compilers bundled with vc++ If you're nerdly. go for intel c++ compilers :] <long list of compilers here>
GCC for Unix-like OSes (it's been ported to Windows aswell under the name of MinGW) VC++ for Windows, but beware that it attempts to deprecate parts of the standard and may cause you to use Windows-specific code. Clang is also good, but it doesn't have C++0x support.
[QUOTE=Jookia;27118045]Clang is also good, but it doesn't have C++0x support.[/QUOTE] Not entirely true. Clang currently supports the decltype operator, as well as the ability to distinguish between a right shift >>, and closing template statements >> It also supports long long, as well as inlined namespaces and a variety of other smaller features. While it isn't as feature full as other compilers, there are some features available now, with more on the way.
[QUOTE=Chandler;27118498]Not entirely true. Clang currently supports the decltype operator, as well as the ability to distinguish between a right shift >>, and closing template statements >> It also supports long long, as well as inlined namespaces and a variety of other smaller features. While it isn't as feature full as other compilers, there are some features available now, with more on the way.[/QUOTE] Oh, awesome! My current needs are simply shared_ptr, so I didn't pick up on it.
[QUOTE=Jookia;27118045]VC++ for Windows, but beware that it attempts to deprecate parts of the standard and may cause you to use Windows-specific code.[/QUOTE] Hey, just to be clear, MSVC will not "cause" you to use Windows specific code.
[QUOTE=Jookia;27118544]Oh, awesome! My current needs are simply shared_ptr, so I didn't pick up on it.[/QUOTE] clang can use std::tr1::shared_ptr until it gets an official library. (Also, clang uses the gcc libstdc++, and works nearly every time as long as you don't use something such as lambdas, or move semantics)
[QUOTE=limitofinf;27123031]Hey, just to be clear, MSVC will not "cause" you to use Windows specific code.[/QUOTE] It will unless you turn off deprecation errors that tel;l you to use its non-standard 'safe' functions.
I would say that it's best to use Clang for debug builds, as it produces very nice easy to understand error messages, then use g++ for release, because it will produce slightly faster binaries than clang. This is if you're on a unix platform. On Windows it's probably just easiest to use VC++ express and Microsoft's compiler.
[QUOTE=Jookia;27143873]It will unless you turn off deprecation errors that tel;l you to use its non-standard 'safe' functions.[/QUOTE] Hey, Those are warnings, not errors. Besides, most of them (all of them?) are C string/input manipulation functions that you shouldn't be using anyways with the availability of C++ streams. [editline]2nd January 2011[/editline] That said, MSVC is practically doing you a favor.
Sorry, you need to Log In to post a reply to this thread.