From the course: C++ IDE Overview

Installing C++ compiler on a PC

From the course: C++ IDE Overview

Start my 1-month free trial

Installing C++ compiler on a PC

- [Instructor] Before we begin exploring IDE's, we will need a C++ Compiler. The C++ community is lucky to have two great compilers. The GNU Compiler Collection aka GCC, and Clang. Both of these compilers will run anywhere there is a Unix style developer's tool chain. This includes Linux, Mac, and with a little work, even Windows. If you're using a Mac computer, please follow the Mac instructions. For Windows, there are two versions of GCC available. MinGW and Cygwin. They are both excellent packages, but I am going to install Cygwin since it is well supported and has a good installation program. Go to cygwin dot com and click the install Cygwin link in the upper left hand corner. This page has two available installers. One for 64 bit Windows, and the other for 32. I have 64 bit, so I click the setup x86 64 exe link to download it. Once the file is downloaded, click it to install. If asked, allow setup x86 64 dot exe to make changes, click yes. Once the installer begins, click next. On the page choose a download source, maker sure install from internet is selected. Click next. Accept the default on the select route install directory page Cygwin 64 and all users recommended, click next. Accept the default on select local package directory, click next. On the select your internet connection, accept the default use system proxy settings, click next. On choose a download site, accept the default if chosen, otherwise pick a source closest to your home country. And click next to begin downloading the files. On the select packages page, we only need a few to use the C++ Compiler. The easiest way to find them all is to type their names into the search box. First up is GCC dash core C-O-R-E. And that is the C compiler. And so here it is GCC core. We're going to click on skip, and that selects it. Next up is GCC dash G++, and this is the C++ sub package. And here it is right here. We select it. Then we have the lib GCC one, we select it. And then we have GDD which is the debugger. We select it. Then is make, which is the build tool. And let's see, scroll down, and here is make. And finally we have LIB MPFR four, which will be both in the LIB folder and in the MATH folder. And we select it. And then we go next. And here are all of our packages that are going to be installed, we select next. And now it will take a bit for it to install the rest of these packages. And we go ahead and click finish. Once the download is complete, type edit environment variables in the search box. Select the best match, edit environment variables for your account, click environment variables. Underneath the user, select path, click edit, click new, and then type the following: C colon back slash Cygwin 64 forward slash bin. This adds Cygwin to your path so that all of its tools are available at the command prompt. Click okay, click okay again, and click okay to clear the dialog box. And then from the search box type CMD, and hit enter. And then type GCC dash dash version. If everything was installed correctly, we'll see the GCC version and copyright information. And we see it, so that tells us our C++ compiler is ready to go, and we've made it available from the command prompt, so now we're ready to add an IDE.

Contents