1
00:00:05,640 --> 00:00:11,530
This video I'll take you through the steps necessary to install the C++ compiler on the Windows operating

2
00:00:11,530 --> 00:00:12,620
system.

3
00:00:12,700 --> 00:00:15,610
We're going to use the Minimalist GNU for Windows. 

4
00:00:15,680 --> 00:00:17,960
GNU stands for GNUs not Unix.

5
00:00:17,980 --> 00:00:26,320
It's basically a compiler collection called GCC that includes the C compiler,  C++ compiler,  Fortran compiler,

6
00:00:26,320 --> 00:00:27,460
and an Ada compiler.

7
00:00:27,550 --> 00:00:32,830
We're only going to be using the C++ compiler in this class so we'll only install that .

8
00:00:32,830 --> 00:00:39,280
Open up your favorite browser and you go to mingw.org. You'll see a page similar to this and what you want

9
00:00:39,280 --> 00:00:44,040
to do on this page is click on the button at the top right here called 'Download Installer'.

10
00:00:44,110 --> 00:00:51,990
So I'm going to select that and that'll automatically start a download of the MinGW installer.

11
00:00:52,000 --> 00:00:57,000
It's a pretty small file, so it should be a quick download depending on your internet connection.

12
00:00:57,340 --> 00:00:59,580
Ok so I'm finished downloading.

13
00:00:59,740 --> 00:01:01,990
And what I want to do is just run that installer.

14
00:01:01,990 --> 00:01:05,570
So I'm just going to double click on it and I'll close down the browser.

15
00:01:05,920 --> 00:01:10,440
OK so what we're going to do here is we're basically just going to follow the installation wizard.

16
00:01:10,540 --> 00:01:17,250
I'm going to install and I want to install in C:\MinGW 

17
00:01:17,380 --> 00:01:22,570
Now certainly this could be a different drive letter but don't change the name of the installation directory

18
00:01:22,570 --> 00:01:25,170
and certainly don't put spaces or anything in there.

19
00:01:25,180 --> 00:01:30,260
I'd suggest that you just keep the default if you can.  Keep all the default settings and press continue

20
00:01:31,960 --> 00:01:35,860
and this will start the download of the installation manager.

21
00:01:35,860 --> 00:01:42,130
Now once the installation manager is downloaded then we can continue and we can start downloading and

22
00:01:42,130 --> 00:01:44,200
installing the actual compiler.

23
00:01:56,270 --> 00:02:02,450
OK, so when the download is complete,  you can see that on my system it processed 113 items and it only

24
00:02:02,450 --> 00:02:03,440
took a couple of minutes.

25
00:02:03,440 --> 00:02:04,570
I sped up the video.

26
00:02:04,640 --> 00:02:07,000
so you didn't have to wait through the installation.

27
00:02:07,070 --> 00:02:13,220
Once you're finished, just press continue and you're going to be shown a window which is the installation

28
00:02:13,220 --> 00:02:14,350
manager.

29
00:02:14,360 --> 00:02:19,610
Now here what you want to do is you want to click Basic Set up on the left and you want to select three

30
00:02:19,700 --> 00:02:27,620
of these packages on the right.  You want to select the msys-base down near the bottom and you select

31
00:02:27,650 --> 00:02:29,220
mark for installation.

32
00:02:29,360 --> 00:02:31,940
You want to select the mingw32-gcc-g++

33
00:02:31,940 --> 00:02:40,490
package. That package contains the C and the C++ compilers and will mark for

34
00:02:40,490 --> 00:02:41,740
installation as well.

35
00:02:42,110 --> 00:02:47,880
And you want to select the mingw-base package and we'll mark that for installation.

36
00:02:47,940 --> 00:02:53,450
Now once you've got those three selected, you can come back up here to the installation menu and press

37
00:02:53,480 --> 00:02:56,860
apply changes.

38
00:02:56,870 --> 00:03:05,510
Now at this point we can click apply and it's going to download and install the new compiler.

39
00:03:17,720 --> 00:03:19,420
OK,  so that's the installation.

40
00:03:19,430 --> 00:03:22,790
It only took a couple of minutes on my machine. I'll select to close.

41
00:03:23,000 --> 00:03:25,900
And at this point we're done installing the compiler.

42
00:03:25,970 --> 00:03:31,460
Now there's one step that you should take. In this case we want to set the path variable on our Windows

43
00:03:31,460 --> 00:03:33,580
system to the binary directory.

44
00:03:33,590 --> 00:03:35,060
So let me show you how to do that.

45
00:03:35,060 --> 00:03:39,020
Open up your control panel.  You can open it up down here or you can open it up right here. I've just got

46
00:03:39,020 --> 00:03:44,990
a shortcut on my desktop and you can search your control panel for ENV for environment variables.

47
00:03:45,020 --> 00:03:49,670
I'll just type ENV and you can select Edit the system environment variables.

48
00:03:50,020 --> 00:03:50,610
OK.

49
00:03:50,840 --> 00:03:58,370
Now at this point you want to come down here to where it says 'environment variables' and press that and then

50
00:03:58,370 --> 00:04:06,680
down to 'system variables' and select the path right there and you want to edit the path.  And what you

51
00:04:06,680 --> 00:04:09,580
want to do is you want to add a new variable to the path.

52
00:04:09,570 --> 00:04:17,329
So going to select new and at this point you want to browse and find the directory where you installed

53
00:04:17,390 --> 00:04:18,980
the compiler libraries.

54
00:04:18,980 --> 00:04:21,540
So in this case it was my C-Drive

55
00:04:24,160 --> 00:04:30,560
and it was the MinGW directory and you want to go to the bin subdirectory and select that. That's where

56
00:04:30,560 --> 00:04:36,410
the binaries are for the executive files and then press OK and OK one more time.

57
00:04:36,410 --> 00:04:40,090
And just finish off and close everything up.

58
00:04:40,400 --> 00:04:41,250
That's it.

59
00:04:41,360 --> 00:04:46,820
The compiler system is now installed and we're ready to compile.  The next step is if you're going to

60
00:04:46,820 --> 00:04:52,130
install an integrated development environment or IDE now your compiler is all set up and you can proceed

61
00:04:52,130 --> 00:04:53,250
with that step.

