1
00:00:00,630 --> 00:00:05,970
OK, everybody, so this is going to be a pretty big tutorial.

2
00:00:06,440 --> 00:00:11,280
I'm just going to drop a lot of information on you, and I'm not apologize in advance about that.

3
00:00:11,640 --> 00:00:19,380
But the thing is is that we need to make sure that everyone can get up and running with everything that

4
00:00:19,380 --> 00:00:23,830
they need to start programming in C++ for this course.

5
00:00:24,630 --> 00:00:30,330
And that means doing a decent amount of stuff, especially for windows.

6
00:00:30,810 --> 00:00:39,690
So if you already have C++ installed, which by that I mean a C++ compiler, then of course you don't

7
00:00:39,690 --> 00:00:42,360
need to worry about this section here.

8
00:00:43,230 --> 00:00:48,120
But I'm kind of going to have to drop a lot of knowledge on you.

9
00:00:48,120 --> 00:00:54,990
In a short video, I will try and explain things as much as I can, but they won't really be that important.

10
00:00:55,010 --> 00:01:01,560
It's just kind of like, follow the steps so you can prepare yourself to be able to start writing code

11
00:01:01,950 --> 00:01:02,820
in this course.

12
00:01:03,390 --> 00:01:07,170
So with that said, I'm going to do it in a certain way.

13
00:01:07,170 --> 00:01:16,020
I'm going to install a specific compiler, which will be a Windows ported version of the new compiler

14
00:01:16,020 --> 00:01:18,270
collection, which is very popular.

15
00:01:18,870 --> 00:01:24,840
I'm also going to have a video if you have Mac or Linux for this, which is a little easier because

16
00:01:24,840 --> 00:01:28,260
you kind of already have some of the necessary tools that you need installed.

17
00:01:29,610 --> 00:01:36,060
But on windows, you need to kind of set something up so you can write C++ code.

18
00:01:36,930 --> 00:01:43,530
You might already have an editor that you just want to download that will have a compiler for you.

19
00:01:44,220 --> 00:01:50,700
For example, much of this class is going to be taught using something called sea lion, which is this

20
00:01:50,700 --> 00:01:52,080
icon right here.

21
00:01:52,830 --> 00:01:58,950
That is an integrated development environment, which I will be talking about more later.

22
00:01:59,250 --> 00:02:00,800
It has a lot of tools.

23
00:02:00,810 --> 00:02:07,980
It's very fancy, but I want to make sure that everyone has the ability to follow through with this

24
00:02:07,980 --> 00:02:12,090
course if they maybe don't want to download Sea Lion.

25
00:02:13,440 --> 00:02:22,050
Sea Lion may or may not be free for you to download, depending on your situation, whether you're a

26
00:02:22,050 --> 00:02:24,270
student or not.

27
00:02:25,590 --> 00:02:28,710
So I don't want to force everyone down that path.

28
00:02:28,710 --> 00:02:34,360
I want you to be able to use whatever editing environment you would like.

29
00:02:34,380 --> 00:02:37,290
And so we're going to go over various types of those.

30
00:02:38,370 --> 00:02:42,360
So, for example, this icon here is a visual studio code.

31
00:02:42,720 --> 00:02:51,900
I also have this access to the command line prompt here, but it also can just be searched here to bring

32
00:02:51,900 --> 00:02:52,620
that up as well.

33
00:02:52,650 --> 00:02:55,800
That has an editor inside of it as well a basic editor.

34
00:02:55,800 --> 00:02:58,080
So we're going to be looking at multiple editors.

35
00:02:58,560 --> 00:03:03,180
We'll look at Visual Studio Code, which is just a really nice text editor.

36
00:03:03,330 --> 00:03:10,740
It's a graphical we'll look at command line based editors and we'll, of course, look at a big integrated

37
00:03:10,740 --> 00:03:11,710
development environment.

38
00:03:11,820 --> 00:03:18,840
So I'm going to go over all of those, and this video is going to be mainly about installing a C++ compiler.

39
00:03:19,770 --> 00:03:29,940
So remember, we talked very briefly about how we take the code and get it to run on the computer.

40
00:03:30,120 --> 00:03:35,830
I kind of have those three little squares on that one slide.

41
00:03:36,750 --> 00:03:42,360
In the past where I showed, OK, you can write it kind of like you would in a text document or something,

42
00:03:42,720 --> 00:03:49,830
and then you use a compiler or interpreter to convert the code into something the computer can understand.

43
00:03:50,250 --> 00:03:52,020
And then after that, you can run the code.

44
00:03:52,470 --> 00:03:55,520
So that middle part is what we're focusing on today.

45
00:03:55,530 --> 00:04:02,880
We're just trying to get our computers set up with a compiler so we can translate the code that we write

46
00:04:03,090 --> 00:04:05,760
into something that the computer can understand.

47
00:04:06,660 --> 00:04:08,760
So enough babbling and stuff.

48
00:04:08,760 --> 00:04:11,750
While you look at my blank computer screen, let's get started on this.

49
00:04:11,760 --> 00:04:13,230
I'm going to open up a browser.

50
00:04:15,930 --> 00:04:24,810
And what I'm willing to do is head to something called men GW, so I'm going to search that here, and

51
00:04:24,810 --> 00:04:33,120
the top result here is a SourceForge dot net place where I can download this many GW compiler, which

52
00:04:33,120 --> 00:04:37,890
you see is the minimalist Ganiyu for a Windows download.

53
00:04:41,190 --> 00:04:47,100
So once I go to this page, I am just going to go to this download button and you see that when I hover,

54
00:04:47,100 --> 00:04:51,900
it says download mind GW get set up ICSI from SourceForge.

55
00:04:51,900 --> 00:04:58,710
So that says it's an executable which will basically set up and install and GW for us.

56
00:04:59,280 --> 00:05:02,250
So I am going to click that.

57
00:05:11,570 --> 00:05:13,250
OK, so we have it down here.

58
00:05:13,280 --> 00:05:15,260
I'm going to go ahead and click on this.

59
00:05:17,440 --> 00:05:20,950
That will open this installer right here when I minimize that.

60
00:05:25,070 --> 00:05:29,060
OK, so then what I'm going to do is just click install.

61
00:05:31,340 --> 00:05:33,950
And do not change the installation directory.

62
00:05:33,980 --> 00:05:36,380
Let's just leave it with the defaults, OK?

63
00:05:36,410 --> 00:05:38,300
That way, we don't mess anything up.

64
00:05:38,300 --> 00:05:41,810
I just want everyone to be able to have a smooth installation process.

65
00:05:42,740 --> 00:05:46,100
So we're going to just leave all these defaults here.

66
00:05:46,970 --> 00:05:52,700
This also has the command line and graphical options for the user interface here.

67
00:05:52,730 --> 00:05:56,030
I'm just going to leave it like that and kind of get everything.

68
00:05:59,800 --> 00:06:05,140
So now we wait as it's connecting and downloading, this may take a little bit.

69
00:06:07,110 --> 00:06:11,940
OK, so now this initial set of part has finished.

70
00:06:12,210 --> 00:06:15,630
So what I'm going to do is just click continue.

71
00:06:17,250 --> 00:06:20,910
That brings me to this minging insulation manager pain here.

72
00:06:21,570 --> 00:06:28,020
You notice up here that it offers various packages that we can install and it has the descriptions over

73
00:06:28,020 --> 00:06:29,490
here on the right hand side.

74
00:06:31,290 --> 00:06:33,820
So we have this developer tool kit.

75
00:06:34,730 --> 00:06:41,550
We have the basic GW installation at a compiler, Ganiyu Fortran compiler.

76
00:06:41,760 --> 00:06:47,070
They're going to use C++ compiler, which is really what we care about eject objective.

77
00:06:47,070 --> 00:06:49,950
See, that's another programming language, just like Fortran.

78
00:06:51,200 --> 00:06:55,100
And then we have this basic Ms Waste installation thing down here, so.

79
00:06:56,600 --> 00:07:02,840
I'm actually going to just click on all of these, even though I don't necessarily need the FORTRAN

80
00:07:02,840 --> 00:07:09,590
and at an objective see, I'm just going to go ahead and install it all because it won't really take

81
00:07:09,590 --> 00:07:13,340
up too much space on here, so it should be OK.

82
00:07:14,790 --> 00:07:17,310
I'm going to click on this Mark for installation.

83
00:07:20,540 --> 00:07:27,020
Click on this, Mark, for installation works for installation, and just do this for all of this right

84
00:07:27,020 --> 00:07:27,470
here.

85
00:07:29,970 --> 00:07:30,360
OK.

86
00:07:32,510 --> 00:07:32,870
Cool.

87
00:07:33,290 --> 00:07:36,080
So then I'm going to go up here to installation.

88
00:07:37,910 --> 00:07:41,510
And I'm going to say apply changes.

89
00:07:42,800 --> 00:07:48,190
You know, ask if I'm OK to proceed and then I'm going to click apply right here.

90
00:07:50,010 --> 00:07:52,770
And now it's going to go ahead and install these packages.

91
00:07:57,820 --> 00:08:03,430
OK, so I just went ahead and actually closed those dialog boxes there.

92
00:08:03,700 --> 00:08:08,620
Once everything was done with the installation, it should say at the top that you can close out of

93
00:08:08,620 --> 00:08:15,640
the dialog box so you can just click close and you can actually close out of the main package installer

94
00:08:15,640 --> 00:08:17,740
window and just out of that as well.

95
00:08:18,220 --> 00:08:21,160
But unfortunately, we're not completely done yet.

96
00:08:21,520 --> 00:08:31,630
We need to do something where we add our location of installation for many GW to our path environment

97
00:08:31,630 --> 00:08:32,110
variable.

98
00:08:32,110 --> 00:08:38,860
So that basically is something that just allows windows to be able to locate main GW.

99
00:08:38,860 --> 00:08:41,470
So that way we could compile our programs from anywhere.

100
00:08:42,520 --> 00:08:45,400
So it needs to be added to our environment variables.

101
00:08:46,030 --> 00:08:49,450
So what I'm going to do first is just verify that installation.

102
00:08:49,480 --> 00:08:52,990
I'm going to go to see slash.

103
00:08:53,110 --> 00:08:58,510
I mean GW, because that's where it was installed and what we're interested in.

104
00:08:58,510 --> 00:09:00,690
Is this right here?

105
00:09:00,700 --> 00:09:02,980
So this bin?

106
00:09:03,460 --> 00:09:09,580
So we basically want to I'm going to copy this address here.

107
00:09:12,330 --> 00:09:17,730
We're interested in this folder right here on C and then Mangy W and then been.

108
00:09:19,540 --> 00:09:26,290
So then at that point, what we can do is actually go to a search environment, variables on here and

109
00:09:26,290 --> 00:09:29,480
you see this thing pops up, edit the system environment variables.

110
00:09:30,190 --> 00:09:31,450
So I'm going to go there.

111
00:09:31,720 --> 00:09:36,670
This pane pops up right here and I'm going to go down here to environment variables.

112
00:09:37,840 --> 00:09:40,930
And what we're interested in is these system variables.

113
00:09:40,930 --> 00:09:44,230
And more specifically, we're interested in the path variables.

114
00:09:44,230 --> 00:09:45,880
So we need to add something to our path.

115
00:09:46,150 --> 00:09:49,870
What we're going to do is edit, ah, path system, environment variable.

116
00:09:51,710 --> 00:09:56,630
And so what we want to do is make a new environment variable.

117
00:09:58,720 --> 00:10:00,250
And this is just going to be.

118
00:10:01,990 --> 00:10:04,580
This thing right here, so you notice I just pasted that.

119
00:10:04,930 --> 00:10:11,650
So it came from the C Drive and then we had many GW folder with the bin folder in it, and I just copy

120
00:10:11,650 --> 00:10:13,120
that back there and paste it.

121
00:10:13,630 --> 00:10:18,310
Otherwise, if you didn't copy that back when I copied it there, you can just type this right here

122
00:10:19,360 --> 00:10:24,730
and then we'll just click OK, and then we will just click, OK.

123
00:10:26,080 --> 00:10:28,630
So we should be good now.

124
00:10:29,110 --> 00:10:38,950
What we want to do now is check to see that it's actually installed, so I have my command prompt right

125
00:10:38,950 --> 00:10:41,110
here pinned to the taskbar.

126
00:10:41,620 --> 00:10:47,590
But you, if you don't have that, you can just go here and type CMG and that will bring the command

127
00:10:47,590 --> 00:10:48,040
prompt.

128
00:10:49,120 --> 00:10:53,300
I mean, you notice this kind of small here, so I'm just going to click this because I've already edited

129
00:10:53,300 --> 00:10:54,220
it to be pretty big.

130
00:10:55,090 --> 00:11:04,660
So what we want to do is actually say, gee, + + + y g + +, because that was that one package that

131
00:11:04,660 --> 00:11:13,090
is used to compile C++ programs, you noticed that it said it was a C++ language compiler for that one

132
00:11:13,090 --> 00:11:14,170
package down there.

133
00:11:14,410 --> 00:11:16,390
We installed all the packages.

134
00:11:16,750 --> 00:11:25,780
If you wanted to, you could just only install the C++ compiler and kind of the base package, but I

135
00:11:25,780 --> 00:11:27,880
just kind of wanted all of them, so put them all there.

136
00:11:28,540 --> 00:11:33,100
So what we're going to do is check the version by doing G Plus Plus test version.

137
00:11:34,420 --> 00:11:41,860
And you notice when we press enter, it shows us G Plus plus min GW dot org GCC, and then it has the

138
00:11:41,860 --> 00:11:43,720
version number right here.

139
00:11:43,720 --> 00:11:45,580
We're dealing with six point 3.0.

140
00:11:47,070 --> 00:11:50,580
Then it just listen to some list, some stuff about the licence and all that.

141
00:11:51,420 --> 00:11:57,420
So yeah, this shows us that we actually have a big plus plus compiler now.

142
00:11:58,770 --> 00:12:00,490
So that's all good.

143
00:12:00,510 --> 00:12:06,870
You have a compiler for a C++ now, and if you checked all those boxes, you also have some.

144
00:12:08,580 --> 00:12:12,780
Tools to deal with other languages like Fortran and Objective-C in all this.

145
00:12:13,350 --> 00:12:16,800
So this was meant to just show Windows users how to install this.

146
00:12:16,980 --> 00:12:18,150
I'm going to stay out of here.

147
00:12:20,610 --> 00:12:25,590
And then now that we have that compiler, we basically can start writing some code for stuff.

148
00:12:25,950 --> 00:12:32,580
So like I said, if you already have an editor like an integrated development environment like Sea Lion

149
00:12:32,580 --> 00:12:36,210
or Visual Studio or something, that's totally fine.

150
00:12:36,210 --> 00:12:40,800
You could just use that and you don't have to use this, but I wanted to make sure everyone had accessibility.

151
00:12:41,310 --> 00:12:47,730
So at this point in time, now that we have the compiler, we can write our code in whatever lightweight

152
00:12:47,730 --> 00:12:53,040
text editor that we want or command line based text editor.

153
00:12:54,350 --> 00:13:00,320
And then we'll just be able to compile it from a either built in command line to the editor or from

154
00:13:00,320 --> 00:13:04,670
our actual command line, so that's what we're going to be doing in the near future.

155
00:13:04,670 --> 00:13:12,290
Is writing a simple C++ program, compiling it to make sure that it actually makes a program that can

156
00:13:12,290 --> 00:13:13,610
run on our computer.

157
00:13:13,880 --> 00:13:17,240
And then we will go ahead and see the output of that.

158
00:13:18,020 --> 00:13:20,780
So hopefully there wasn't any issues for you.

159
00:13:20,780 --> 00:13:25,850
I tried to break it down there on like pretty well in detail on how to install this.

160
00:13:27,290 --> 00:13:36,380
And I'm also going to make some videos on how to get it up and running on OSX, which is Mac and various

161
00:13:36,380 --> 00:13:42,140
distributions of Linux, which, you know, those are a lot easier because a lot of them already come

162
00:13:42,140 --> 00:13:46,370
with this new compiler collection on there.

163
00:13:46,400 --> 00:13:50,510
So with that, I will see you in the next lectures.
