Jump to content

Modern C++: The Good Parts/Getting a compiler

From Wikibooks, open books for an open world

C++ is a compiled language, meaning that those who use it commonly use a compiler to convert C++ source code into something more machine-friendly, which is then executed. You will need a compiler to complete the exercises in this book, but fear not! Compilers are freely available and reasonably easy to set up. This page will attempt to help you decide which one(s) to install.

If you expect to learn GUI development with Qt later, you should install Qt Creator, and make sure to check the box for the latest MinGW. (Note: If you're one of my students, get Qt Creator.)

Visual Studio Express for Windows Desktop is a good free option which requires essentially zero setup, other than a very long installation. If you have money to spend, some other version of Visual Studio can serve you better, but you can make that decision later.

Clang can be a better option, except that its setup can be very involved, especially if you happen to want the latest version for Windows (in which case read this). Clang is well-known for very useful error messages.

The GNU Compiler Collection (GCC) is another good option. On Windows, MinGW is little more than the compiler while Cygwin is like some Linux for your Windows. If you don't understand that last part, just go with MinGW.

If you don't trust my short list, see the significantly longer one from the originator of C++, Bjarne Stroustrup.

Once you have a compiler installed, see the next page to make sure it's in working order.

Modern C++: The Good Parts
Getting a compiler Hello, world! →