OK, everybody, so this is going to be a pretty big tutorial.
I'm just going to drop a lot of information on you, and I'm not apologize in advance about that.
But the thing is is that we need to make sure that everyone can get up and running with everything that
they need to start programming in C++ for this course.
And that means doing a decent amount of stuff, especially for windows.
So if you already have C++ installed, which by that I mean a C++ compiler, then of course you don't
need to worry about this section here.
But I'm kind of going to have to drop a lot of knowledge on you.
In a short video, I will try and explain things as much as I can, but they won't really be that important.
It's just kind of like, follow the steps so you can prepare yourself to be able to start writing code
in this course.
So with that said, I'm going to do it in a certain way.
I'm going to install a specific compiler, which will be a Windows ported version of the new compiler
collection, which is very popular.
I'm also going to have a video if you have Mac or Linux for this, which is a little easier because
you kind of already have some of the necessary tools that you need installed.
But on windows, you need to kind of set something up so you can write C++ code.
You might already have an editor that you just want to download that will have a compiler for you.
For example, much of this class is going to be taught using something called sea lion, which is this
icon right here.
That is an integrated development environment, which I will be talking about more later.
It has a lot of tools.
It's very fancy, but I want to make sure that everyone has the ability to follow through with this
course if they maybe don't want to download Sea Lion.
Sea Lion may or may not be free for you to download, depending on your situation, whether you're a
student or not.
So I don't want to force everyone down that path.
I want you to be able to use whatever editing environment you would like.
And so we're going to go over various types of those.
So, for example, this icon here is a visual studio code.
I also have this access to the command line prompt here, but it also can just be searched here to bring
that up as well.
That has an editor inside of it as well a basic editor.
So we're going to be looking at multiple editors.
We'll look at Visual Studio Code, which is just a really nice text editor.
It's a graphical we'll look at command line based editors and we'll, of course, look at a big integrated
development environment.
So I'm going to go over all of those, and this video is going to be mainly about installing a C++ compiler.
So remember, we talked very briefly about how we take the code and get it to run on the computer.
I kind of have those three little squares on that one slide.
In the past where I showed, OK, you can write it kind of like you would in a text document or something,
and then you use a compiler or interpreter to convert the code into something the computer can understand.
And then after that, you can run the code.
So that middle part is what we're focusing on today.
We're just trying to get our computers set up with a compiler so we can translate the code that we write
into something that the computer can understand.
So enough babbling and stuff.
While you look at my blank computer screen, let's get started on this.
I'm going to open up a browser.
And what I'm willing to do is head to something called men GW, so I'm going to search that here, and
the top result here is a SourceForge dot net place where I can download this many GW compiler, which
you see is the minimalist Ganiyu for a Windows download.
So once I go to this page, I am just going to go to this download button and you see that when I hover,
it says download mind GW get set up ICSI from SourceForge.
So that says it's an executable which will basically set up and install and GW for us.
So I am going to click that.
OK, so we have it down here.
I'm going to go ahead and click on this.
That will open this installer right here when I minimize that.
OK, so then what I'm going to do is just click install.
And do not change the installation directory.
Let's just leave it with the defaults, OK?
That way, we don't mess anything up.
I just want everyone to be able to have a smooth installation process.
So we're going to just leave all these defaults here.
This also has the command line and graphical options for the user interface here.
I'm just going to leave it like that and kind of get everything.
So now we wait as it's connecting and downloading, this may take a little bit.
OK, so now this initial set of part has finished.
So what I'm going to do is just click continue.
That brings me to this minging insulation manager pain here.
You notice up here that it offers various packages that we can install and it has the descriptions over
here on the right hand side.
So we have this developer tool kit.
We have the basic GW installation at a compiler, Ganiyu Fortran compiler.
They're going to use C++ compiler, which is really what we care about eject objective.
See, that's another programming language, just like Fortran.
And then we have this basic Ms Waste installation thing down here, so.
I'm actually going to just click on all of these, even though I don't necessarily need the FORTRAN
and at an objective see, I'm just going to go ahead and install it all because it won't really take
up too much space on here, so it should be OK.
I'm going to click on this Mark for installation.
Click on this, Mark, for installation works for installation, and just do this for all of this right
here.
OK.
Cool.
So then I'm going to go up here to installation.
And I'm going to say apply changes.
You know, ask if I'm OK to proceed and then I'm going to click apply right here.
And now it's going to go ahead and install these packages.
OK, so I just went ahead and actually closed those dialog boxes there.
Once everything was done with the installation, it should say at the top that you can close out of
the dialog box so you can just click close and you can actually close out of the main package installer
window and just out of that as well.
But unfortunately, we're not completely done yet.
We need to do something where we add our location of installation for many GW to our path environment
variable.
So that basically is something that just allows windows to be able to locate main GW.
So that way we could compile our programs from anywhere.
So it needs to be added to our environment variables.
So what I'm going to do first is just verify that installation.
I'm going to go to see slash.
I mean GW, because that's where it was installed and what we're interested in.
Is this right here?
So this bin?
So we basically want to I'm going to copy this address here.
We're interested in this folder right here on C and then Mangy W and then been.
So then at that point, what we can do is actually go to a search environment, variables on here and
you see this thing pops up, edit the system environment variables.
So I'm going to go there.
This pane pops up right here and I'm going to go down here to environment variables.
And what we're interested in is these system variables.
And more specifically, we're interested in the path variables.
So we need to add something to our path.
What we're going to do is edit, ah, path system, environment variable.
And so what we want to do is make a new environment variable.
And this is just going to be.
This thing right here, so you notice I just pasted that.
So it came from the C Drive and then we had many GW folder with the bin folder in it, and I just copy
that back there and paste it.
Otherwise, if you didn't copy that back when I copied it there, you can just type this right here
and then we'll just click OK, and then we will just click, OK.
So we should be good now.
What we want to do now is check to see that it's actually installed, so I have my command prompt right
here pinned to the taskbar.
But you, if you don't have that, you can just go here and type CMG and that will bring the command
prompt.
I mean, you notice this kind of small here, so I'm just going to click this because I've already edited
it to be pretty big.
So what we want to do is actually say, gee, + + + y g + +, because that was that one package that
is used to compile C++ programs, you noticed that it said it was a C++ language compiler for that one
package down there.
We installed all the packages.
If you wanted to, you could just only install the C++ compiler and kind of the base package, but I
just kind of wanted all of them, so put them all there.
So what we're going to do is check the version by doing G Plus Plus test version.
And you notice when we press enter, it shows us G Plus plus min GW dot org GCC, and then it has the
version number right here.
We're dealing with six point 3.0.
Then it just listen to some list, some stuff about the licence and all that.
So yeah, this shows us that we actually have a big plus plus compiler now.
So that's all good.
You have a compiler for a C++ now, and if you checked all those boxes, you also have some.
Tools to deal with other languages like Fortran and Objective-C in all this.
So this was meant to just show Windows users how to install this.
I'm going to stay out of here.
And then now that we have that compiler, we basically can start writing some code for stuff.
So like I said, if you already have an editor like an integrated development environment like Sea Lion
or Visual Studio or something, that's totally fine.
You could just use that and you don't have to use this, but I wanted to make sure everyone had accessibility.
So at this point in time, now that we have the compiler, we can write our code in whatever lightweight
text editor that we want or command line based text editor.
And then we'll just be able to compile it from a either built in command line to the editor or from
our actual command line, so that's what we're going to be doing in the near future.
Is writing a simple C++ program, compiling it to make sure that it actually makes a program that can
run on our computer.
And then we will go ahead and see the output of that.
So hopefully there wasn't any issues for you.
I tried to break it down there on like pretty well in detail on how to install this.
And I'm also going to make some videos on how to get it up and running on OSX, which is Mac and various
distributions of Linux, which, you know, those are a lot easier because a lot of them already come
with this new compiler collection on there.
So with that, I will see you in the next lectures.