1
00:00:00,550 --> 00:00:01,090
OK.

2
00:00:01,180 --> 00:00:02,320
So welcome back.

3
00:00:02,530 --> 00:00:10,630
In this video lecture, we will be going over how to set up a project in Sea Lion so we can do the same

4
00:00:10,630 --> 00:00:12,850
Hello World program.

5
00:00:13,120 --> 00:00:18,190
And I'll be showing you how to compile and run that from sea lions.

6
00:00:18,190 --> 00:00:25,420
So this is for people who have decided to download and use Sea Lion for the course, whether that be

7
00:00:25,420 --> 00:00:28,600
in addition to Visual Studio and or terminal.

8
00:00:28,870 --> 00:00:35,290
If you would like to use Sea Lion to write code, then I think it would be a good idea for you to watch

9
00:00:35,590 --> 00:00:41,690
this entire video to see how you can set up a project and get it running.

10
00:00:41,710 --> 00:00:45,590
I will also go over some of the basics of Sea Lion.

11
00:00:45,610 --> 00:00:51,160
Of course not covering everything because it is a very complex development environment with a lot of

12
00:00:51,160 --> 00:00:53,410
buttons and things and tools.

13
00:00:53,680 --> 00:00:58,030
But I'll be going over how to just write basic code, compile it and run it.

14
00:00:58,360 --> 00:00:58,750
All right.

15
00:00:58,750 --> 00:01:02,110
So with that, let's go ahead and open sea lion.

16
00:01:02,110 --> 00:01:09,460
So go to wherever your sea lion is and go ahead and click on it or double click on it, or just search

17
00:01:09,460 --> 00:01:11,920
it in here and click on it, whatever you need to do.

18
00:01:14,100 --> 00:01:15,750
So I'm going to open up sea lion.

19
00:01:17,960 --> 00:01:18,470
All right.

20
00:01:18,710 --> 00:01:25,160
So I already kind of made this hello world thing, but what I'm going to do is actually click new project.

21
00:01:27,470 --> 00:01:35,090
And what I want right now is a C++ executable later on, we might be new in C++ libraries and things

22
00:01:35,090 --> 00:01:35,600
like that.

23
00:01:35,750 --> 00:01:40,420
You can also have C programming language executables and libraries.

24
00:01:40,440 --> 00:01:47,510
See, I haven't talked about that at all, but it basically was a predecessor of C++, very similar

25
00:01:47,780 --> 00:01:54,590
to C++, but much less capability as far as, you know, modern programming and stuff like that.

26
00:01:55,440 --> 00:02:01,820
Still a great language still used, but not going to be talking a ton about it, maybe a little bit

27
00:02:01,820 --> 00:02:04,070
in the course embedded.

28
00:02:04,070 --> 00:02:06,220
And then you also even have like some web stuff here.

29
00:02:06,230 --> 00:02:07,050
So pretty cool.

30
00:02:07,070 --> 00:02:09,320
You noticed the sea lion has a lot of stuff.

31
00:02:09,320 --> 00:02:12,200
Just front end JavaScript library react.

32
00:02:12,860 --> 00:02:15,050
So it's pretty, pretty powerful already.

33
00:02:15,050 --> 00:02:17,060
You can see there's a lot going on here with Sea Lion.

34
00:02:17,420 --> 00:02:18,890
So I'm not going to call this untitled.

35
00:02:18,890 --> 00:02:22,820
I'm going to go over here and just call this hello world.

36
00:02:25,520 --> 00:02:33,960
I, Stuart, hello, underscore the score world, and then you can just click Create.

37
00:02:33,980 --> 00:02:37,850
We're going to use the C++ 14.

38
00:02:38,600 --> 00:02:44,300
You can go in here and use newer or earlier versions of C++, if you would like.

39
00:02:44,630 --> 00:02:46,400
I'm just going to stick with 14, though.

40
00:02:51,470 --> 00:02:55,670
All right, so let's check out what it brought up, so this is pretty funny, right?

41
00:02:56,210 --> 00:03:05,810
We didn't even need to type anything, and this is not related to the fact that I call it Hello World.

42
00:03:05,960 --> 00:03:12,860
I could call the file anything, and it's going to just make a hello world program for me, and it's

43
00:03:12,860 --> 00:03:16,670
already going to make a file for me called me and.

44
00:03:17,750 --> 00:03:18,350
So it's not.

45
00:03:18,530 --> 00:03:20,360
It's just like a coincidence.

46
00:03:20,360 --> 00:03:25,270
You know that I call the Hello World, and it also made a hell a whole program.

47
00:03:25,880 --> 00:03:33,560
So something I should say right now is that if you have not watched the Hello World video where I did

48
00:03:33,560 --> 00:03:40,640
it in voice code, go ahead and watch that because it's not only about voice code, it is about Hello

49
00:03:40,640 --> 00:03:44,300
World, and I talk a lot about the Hello World program.

50
00:03:44,300 --> 00:03:50,110
I do not go into great detail about each of these things, but I kind of say it in layman's terms and

51
00:03:50,110 --> 00:03:54,860
then tell you, Hey, look, there's a lot of code that just got dumped on us, but this is the minimum

52
00:03:54,860 --> 00:04:01,520
thing we need to do to make a program that kind of does something interesting at all in C++.

53
00:04:02,480 --> 00:04:04,670
So I'm not going to be going over this program today.

54
00:04:04,910 --> 00:04:07,550
This is just a video about sea lions.

55
00:04:07,550 --> 00:04:12,890
So if you haven't watched that video where it's about Hello World, but I do use Visual Visual Studio

56
00:04:12,890 --> 00:04:14,360
code, please go watch that.

57
00:04:14,360 --> 00:04:20,780
VIDEO So it wrote this whole program for us, which is pretty funny, but it just does this every time

58
00:04:20,780 --> 00:04:21,920
you make a new project.

59
00:04:21,920 --> 00:04:25,760
And then from here you can change things and add things if you want.

60
00:04:26,150 --> 00:04:31,130
One thing we did talk about in that previous video was that the main is a special function.

61
00:04:31,130 --> 00:04:34,030
This name right here for this function is special.

62
00:04:34,040 --> 00:04:36,890
It's kind of like the entry point to our program.

63
00:04:37,610 --> 00:04:39,110
So that's why it puts it here.

64
00:04:39,140 --> 00:04:42,620
It actually makes a file for you called ManeD CP.

65
00:04:42,860 --> 00:04:46,700
Hello World is actually the project folder.

66
00:04:46,700 --> 00:04:55,250
So we chose to call our project Hello World, and it made a folder inside of this location.

67
00:04:56,200 --> 00:05:01,240
You know, this personal projects thing I have here, so wherever you wanted to put that, you can make

68
00:05:01,240 --> 00:05:03,970
a directory or a folder and name it.

69
00:05:04,270 --> 00:05:08,700
And then inside of here, it made this main cup for you.

70
00:05:08,710 --> 00:05:10,510
So this is the C++.

71
00:05:12,380 --> 00:05:20,060
That we're going to compile into an executable, so we chose C++ executable as our project and it Seelye

72
00:05:20,060 --> 00:05:23,900
and said, OK, I'm going to make a directory called Hello World because that's what you wanted to name

73
00:05:23,900 --> 00:05:25,730
your project inside of there.

74
00:05:25,910 --> 00:05:31,040
I'm going to put a bunch of files and I'm going to put this main zip file.

75
00:05:31,640 --> 00:05:33,890
So what are these other bunch of files?

76
00:05:34,400 --> 00:05:37,340
These are things that you should not touch right now.

77
00:05:38,640 --> 00:05:42,540
OK, so do not touch anything in here, do not modify these.

78
00:05:42,990 --> 00:05:53,970
This is how Sea Lion is going to compile our program, so we are not we don't necessarily have to invoke

79
00:05:53,970 --> 00:06:01,290
them in GW compiler ourselves with that G Plus Plus command, although we can from Sea Lion and I will

80
00:06:01,290 --> 00:06:02,820
show you how to do that.

81
00:06:03,450 --> 00:06:12,480
But it is actually going to compile this for us, and it's actually referring to the compilation process

82
00:06:12,480 --> 00:06:13,710
as building.

83
00:06:13,980 --> 00:06:15,780
It's kind of a more broad term.

84
00:06:16,380 --> 00:06:19,710
What it does is it has some special files in here.

85
00:06:20,790 --> 00:06:23,160
Kind of most importantly, is this make file.

86
00:06:23,820 --> 00:06:29,130
And when it makes something, it builds it, which is like the compilation process.

87
00:06:29,130 --> 00:06:37,410
It takes it from our code and puts it into a form that the computer can understand that can be ran on

88
00:06:37,410 --> 00:06:37,950
the computer.

89
00:06:37,960 --> 00:06:45,510
So the way that we build it is to use this little hammer right here.

90
00:06:45,600 --> 00:06:52,560
If you just want to compile slash, build your code, then you would click this little hammer right

91
00:06:52,560 --> 00:06:54,510
here to run it.

92
00:06:55,080 --> 00:07:01,410
You click this play button right here says Run Hello World, except that it's not only running it,

93
00:07:01,560 --> 00:07:03,900
you don't have to click the hammer if you don't want to.

94
00:07:03,930 --> 00:07:11,670
You can just click this play button and it will build, slash, compile the program and then run it

95
00:07:11,670 --> 00:07:12,660
for you all in one.

96
00:07:13,890 --> 00:07:16,020
So this is if you just want to build it.

97
00:07:16,200 --> 00:07:18,930
This is to build it and run it all in one.

98
00:07:20,390 --> 00:07:25,670
And then this little bug right here is to debug, but we are not talking about debugging yet, that

99
00:07:25,670 --> 00:07:27,860
is something that we would talk about later in the course.

100
00:07:28,490 --> 00:07:35,720
Debugging is just when you are basically trying to solve some errors that you've noticed in your program.

101
00:07:35,730 --> 00:07:42,590
So if you have errors, an easy way to figure out how to fix those errors is to debug it.

102
00:07:42,830 --> 00:07:47,060
And Sea Lion has a tool called a debugger that helps you do that.

103
00:07:47,600 --> 00:07:48,850
So that's what this button is.

104
00:07:49,100 --> 00:07:52,070
If you want to debug, we'll get into that later.

105
00:07:52,790 --> 00:08:02,150
So just to kind of reiterate these files here, this see make list that Ti has stuff in it that helps

106
00:08:02,390 --> 00:08:14,360
Sea Lion compile your code, your C++ code, like in here, you know it'll have some executable and

107
00:08:14,360 --> 00:08:18,980
like the main zip file that we write in our code in.

108
00:08:19,610 --> 00:08:22,540
But this is stuff that you should not pay much too much attention to.

109
00:08:22,550 --> 00:08:28,700
Now we might modify it later, but right now we're not going to look at it and definitely do not try

110
00:08:28,700 --> 00:08:30,350
and modify these files right now.

111
00:08:30,350 --> 00:08:33,770
Inside of this, see, make, build, debug directory, just kind of leave those alone.

112
00:08:35,550 --> 00:08:40,170
This is where we're writing our code, it is in the file that has the CBP extension.

113
00:08:40,860 --> 00:08:48,480
And if we wanted to, we could make a lot more files in here that were not CPB files or other extensions.

114
00:08:48,480 --> 00:08:53,490
Like I mentioned, C++ has some other file extensions that we will be looking at in the near future.

115
00:08:54,840 --> 00:09:02,070
So with that already done for us, let's just go ahead and build and run our programs so I can just

116
00:09:02,070 --> 00:09:04,080
come over here and click this play.

117
00:09:06,620 --> 00:09:13,700
And there we go, it prints Hello World to the console, except this time unlike in vs code.

118
00:09:14,240 --> 00:09:17,510
It is just printing it to an area right here.

119
00:09:17,540 --> 00:09:20,420
This is not a terminal like in vs code.

120
00:09:20,750 --> 00:09:27,740
In the code, we had a similar little box down at the bottom here, remember, except it was an instance

121
00:09:27,740 --> 00:09:31,970
of PowerShell, which was like a terminal or a command line.

122
00:09:32,900 --> 00:09:33,830
Kind of like this.

123
00:09:34,780 --> 00:09:37,480
The command prompt, except it was using PowerShell.

124
00:09:39,470 --> 00:09:47,000
And we were able to compile it in there ourselves with G Plus Plus and then run it.

125
00:09:48,080 --> 00:09:55,010
Instead, sea lion is just putting the output right here in vs code, we we compiled it and ran it in

126
00:09:55,010 --> 00:10:00,110
that terminal, and then we saw a similar line print out right in the terminal that said, Hello world

127
00:10:00,380 --> 00:10:02,960
here, it's just printing out to this box.

128
00:10:03,800 --> 00:10:05,600
This is not a terminal right now.

129
00:10:07,070 --> 00:10:12,420
Except if I wanted a terminal, I could have a terminal you see down here.

130
00:10:12,440 --> 00:10:13,610
It says Terminal.

131
00:10:15,750 --> 00:10:23,640
So I can actually go to this terminal and what I can do is actually navigate to the executable file

132
00:10:23,820 --> 00:10:31,470
that was created from the compilation process of this Code C line, compile this and made an executable

133
00:10:31,470 --> 00:10:33,080
and it ran it automatically for us.

134
00:10:33,390 --> 00:10:36,030
The executable is inside of here.

135
00:10:36,510 --> 00:10:42,870
Hello, world dot e e the dot Ekeus stands for executable like we were kind of talking about before,

136
00:10:42,870 --> 00:10:49,830
so I said not to touch any of these other files in here, but we can run this executable from this terminal

137
00:10:49,830 --> 00:10:50,730
if we would like.

138
00:10:51,930 --> 00:11:00,990
So since we're not in PowerShell or bash, uh, if you are in bash in here, like let's say you're running

139
00:11:00,990 --> 00:11:02,160
this on like.

140
00:11:04,570 --> 00:11:11,320
Linux, or if you have a terminal that is similar like on Mac in here and Sea Lion, then you can just

141
00:11:11,320 --> 00:11:17,200
do less, but it's not going to recognize that command here since we're just in the normal Windows Command

142
00:11:17,200 --> 00:11:18,880
prompt like similar to this.

143
00:11:19,780 --> 00:11:22,380
So I'm going to have to do dir instead of else.

144
00:11:22,390 --> 00:11:23,770
It's pretty much the same command.

145
00:11:24,850 --> 00:11:26,710
And then I see all this stuff in here.

146
00:11:26,710 --> 00:11:28,270
I see CMake build debug.

147
00:11:28,480 --> 00:11:32,450
I see, you know, see make list text t.

148
00:11:32,980 --> 00:11:34,840
So see, build, debug.

149
00:11:35,440 --> 00:11:37,040
That's where this file is.

150
00:11:37,060 --> 00:11:38,830
Notice that this is this folder here.

151
00:11:39,280 --> 00:11:42,100
See Makbul debug inside of it is all this stuff.

152
00:11:43,280 --> 00:11:46,910
So this executable lies inside this CMake build debug.

153
00:11:48,240 --> 00:11:55,800
So what I'm going to do is I'm going to change directory with that CD command and I'm going to go into

154
00:11:56,070 --> 00:11:58,920
C make build debug.

155
00:12:00,790 --> 00:12:10,010
So now I change directory into C, make Bill, debug the code command I can do dir and you notice now

156
00:12:10,010 --> 00:12:13,150
what I do there, and it lists all of the stuff inside of it.

157
00:12:13,540 --> 00:12:16,210
I see this hello world right here.

158
00:12:17,160 --> 00:12:23,610
So similar to what we did in the video with the code when we were navigating around into the directory

159
00:12:23,610 --> 00:12:24,670
and then we ran it.

160
00:12:24,690 --> 00:12:33,210
We can now run this file from here so I can do a dot and then a slash and then Hello world, and I'm

161
00:12:33,210 --> 00:12:34,440
not going to do CVP.

162
00:12:34,440 --> 00:12:35,700
I'm going to do XY.

163
00:12:36,770 --> 00:12:39,900
And I press enter and there we go.

164
00:12:39,920 --> 00:12:45,260
It's similar to kind of what we saw in vs code now we have a terminal down here where a command prompt

165
00:12:45,740 --> 00:12:48,550
we ran our executable and it printed it here.

166
00:12:49,510 --> 00:12:51,580
To the console in the terminal.

167
00:12:54,270 --> 00:13:01,140
So another thing that we could do is we could compile it on our own, actually, if we wanted to.

168
00:13:02,120 --> 00:13:06,110
So we would be able to go back.

169
00:13:07,010 --> 00:13:13,010
So it's already been compiled and it created this executable, but I can actually go back to where I

170
00:13:13,010 --> 00:13:17,960
was and to do that, I don't know if I've introduced this command yet.

171
00:13:17,960 --> 00:13:25,910
But rather than changing directory into a folder that is inside of where we are, we can go backwards

172
00:13:25,910 --> 00:13:27,890
by doing CD Dot Dot.

173
00:13:28,580 --> 00:13:31,850
The first dot is standing for the current directory, right?

174
00:13:32,450 --> 00:13:34,130
That's what we used right here.

175
00:13:34,160 --> 00:13:34,640
Kind of.

176
00:13:34,640 --> 00:13:40,130
This is this dot slash is kind of to run this, but the Dot signifies current directory.

177
00:13:41,160 --> 00:13:45,990
If I do it again, it basically tells me to go backwards.

178
00:13:47,820 --> 00:13:50,520
So now you notice that I'm not in make bill debug.

179
00:13:50,650 --> 00:13:54,930
I mean, I went one step backwards to here now to Hello World.

180
00:13:55,800 --> 00:13:59,430
So now I'm at this level, I was in this level.

181
00:13:59,430 --> 00:14:03,690
So this was everything in this dropdown was where I was now.

182
00:14:03,690 --> 00:14:06,420
I close this, now I'm in this level.

183
00:14:07,170 --> 00:14:07,560
All right.

184
00:14:07,560 --> 00:14:10,680
I'm in the Hello World directory, so I have access to all this stuff.

185
00:14:12,380 --> 00:14:15,080
So may not CP is in here, right?

186
00:14:15,110 --> 00:14:22,250
So if we if I want to, I could now use that G Plus Plus command that we've used before to compile it

187
00:14:22,250 --> 00:14:22,730
in here.

188
00:14:22,730 --> 00:14:27,350
So I could do G Plus Plus and mean CP.

189
00:14:28,100 --> 00:14:31,820
And so think to yourself, try and remember what is going to happen after I run this.

190
00:14:31,820 --> 00:14:34,490
What will the name of the executable be?

191
00:14:35,180 --> 00:14:37,820
Do you remember what the default name is?

192
00:14:37,820 --> 00:14:42,740
If I just compile a program and I don't do that thing that we mentioned with the Dash?

193
00:14:42,740 --> 00:14:44,690
Oh, to name the output file.

194
00:14:45,970 --> 00:14:53,810
So let's go ahead and run this, and since we're not in PowerShell or bash instead of else, we're going

195
00:14:53,810 --> 00:14:57,400
to do, do you notice now we get in a.

196
00:14:58,420 --> 00:15:02,100
So remember that is the default naming convention for it.

197
00:15:02,100 --> 00:15:09,080
It's going to call it a taxi or a port, something else, depending on the operating system you're on.

198
00:15:09,100 --> 00:15:11,710
So it might be like A. out or something like that.

199
00:15:13,840 --> 00:15:18,460
So now we can go ahead and run that ad XY because it's just like that.

200
00:15:18,460 --> 00:15:19,240
Hello, world.

201
00:15:21,400 --> 00:15:23,650
So let's go ahead and run that.

202
00:15:23,670 --> 00:15:29,680
I'm going to do dot slash x XY and we notice it's the same thing.

203
00:15:30,100 --> 00:15:32,290
It prints out Hello world for us.

204
00:15:34,170 --> 00:15:40,540
So I can also invoke Bash from here, so it would be similar to like Linux.

205
00:15:41,010 --> 00:15:46,650
I told you kind of earlier I mentioned that I have something called WCL, which is Windows Subsystem

206
00:15:46,650 --> 00:15:47,350
for Linux.

207
00:15:48,120 --> 00:15:54,090
If you really would like to put that, get that running on Windows, you can go online and kind of follow

208
00:15:54,090 --> 00:15:54,750
tutorials.

209
00:15:54,840 --> 00:15:55,800
It's kind of in-depth.

210
00:15:55,800 --> 00:15:59,670
I'm not going to add that because I don't have time to add so many things to this course.

211
00:15:59,670 --> 00:16:07,230
One is focused on programming, but you can go ahead and look that up and follow that process if you

212
00:16:07,230 --> 00:16:12,420
would like to have a kind of instance of Linux running on your computer.

213
00:16:13,230 --> 00:16:20,250
And so when I type bash, it puts me into this bash shell here, similar to how I could do in my normal

214
00:16:20,250 --> 00:16:22,440
command prompt like this.

215
00:16:23,690 --> 00:16:32,090
So from here, I can actually, you know, do else instead of there, and I'm actually going to remove

216
00:16:32,090 --> 00:16:38,120
that ACORN XY file now because I don't want that there anymore.

217
00:16:38,720 --> 00:16:43,880
So now I'm going to go back to the normal console, which is this run right here.

218
00:16:44,640 --> 00:16:46,220
This is where I said, Hello, world.

219
00:16:46,740 --> 00:16:48,950
You know, of course, I can build it and run it again.

220
00:16:49,670 --> 00:16:57,530
It'll say the same thing, similar to inverse code that we code tutorial with the Hello World tutorial

221
00:16:57,960 --> 00:17:00,680
that that that was based on the Hello World tutorial.

222
00:17:00,980 --> 00:17:08,780
I could change this text just like I did in that video and just say, you know, Hello, Dylan, and

223
00:17:08,780 --> 00:17:09,980
I can run this again.

224
00:17:11,660 --> 00:17:13,410
And now it says hello, Dylan.

225
00:17:13,460 --> 00:17:14,000
Instead.

226
00:17:16,070 --> 00:17:19,130
OK, so that is the end of this video.

227
00:17:19,460 --> 00:17:28,970
I just wanted to kind of point out how to do this and sea lion in the next video, I will be going over

228
00:17:29,960 --> 00:17:34,070
how to open them in the terminal and then compile it there.

229
00:17:34,550 --> 00:17:39,530
It will probably be quite familiar because we're just going to be using that G Plus Plus command terminal,

230
00:17:39,530 --> 00:17:42,530
but I'm going to also try and do it on Mac.

231
00:17:42,860 --> 00:17:49,760
So I can kind of show you Mac users really like what it's going to be like when you're compiling on

232
00:17:49,760 --> 00:17:55,430
there and also explain about the compiler for Mac because.

233
00:17:57,540 --> 00:18:03,150
It comes with the Clang compiler, I believe, so we don't need to install it like we do with many GW.

234
00:18:04,320 --> 00:18:05,820
All right, so that's pretty much it.

235
00:18:05,850 --> 00:18:12,660
One last thing is if you're worried about whether it's saved or not, auto saves, I believe quite often,

236
00:18:12,660 --> 00:18:17,060
but you can go to file save all and that will save everything here.

237
00:18:17,070 --> 00:18:22,650
So that is the end of this video, and I will see you in the next lecture.
