Hello everyone. Frank here.
This is the video that's going to be showing you how to install the MinGW
64 compiler.
I know there's been a lot of trouble with servers and VPNs
and Firewalls and all kinds of stuff,
so hopefully this will, will help with that.
So let's get started.
Open up your favourite browser and head over to winlibs.com.
This is, is a library where they've got standalone builds of GCCN,
MinGW 64 for Windows.
And once we're here, we want to click the download link right here.
And what we're at now is, we're at a page where we can download different versions of the compiler.
We can download 32 bit or 64 bit versions of the compiler.
This depends, obviously on the architecture that you've got on your machine.
So it's really important that you, make sure you got the right one.
If you're not sure whether you've got a 32 bit operating system
or a 64 bit operating system, it's really easy to tell.
Just press the Windows key and type Control Panel in the search
and head over to the Control Panel
and then click on System and Security.
And then under System view the amount of Ram and processor speed
and that will display this window.
And you can see right here where it says System type.
Mine says 64 bit operating system,
x 64.
Yours might say 32 bit operating system, x 86.
So be sure you've got the right one.
I know I've got a 64 bit system,
so I'm going to download the 64 bit version of the compiler,
which is this one right here, Windows 64.
And I'm going to download this zip archive.
Don't download these over here on the right, just this one right here.
Or if you're on a 32 bit system, this one right here.
Now as far as whether it's version 12.2 or 3 or 1 or whatever is out there,
just download the latest one. Okay?
As of this recording, this is the latest one.
So I'm going to click on that and download the zip archive.
Now I've already done that to save two times and I put it on my desktop
and here it is.
Now what we want to do is
We want to extract that zip archive.
There's no installer built-in,
you can't just double click and have this compiler install.
What we want to do is Just unzip this file,
store it in a place and then update the Windows path
and that's all we need to know when we're done. It's a pretty easy thing to do.
So, I want to right click on here and I want to select Extract All
and get rid of all this extra stuff that's in here.
All we want to really put in there is C colon back slash.
C colon back slash. That's it. That's all we want to do here.
What's going to happen is
This is going to be extracted to a MinGW 64 folder right here.
Don't put this in program files.
Don't put it anywhere else.
Just put it right off your C drive.
So, you can select, show extracted files when complete,
I'm not, I'm just going to click Extract.
And this process takes a little while.
There's about 7900 items that it has to extract.
So, it might take a couple of minutes.
I'll speed up the video here just to save a little bit of time.
All right, so the process is almost complete.
It probably took about four minutes on my computer and we're done.
We've unzipped that archive.
Now, what we want to do is
Open up file explorer and go over to your C drive.
And you will see a folder called MinGW 64.
You can see it right here, that's what was just created.
And if I double click on there,
you'll see the bin folder, the include folder.
These are all the folders that the MinGW C++ compiler needs.
This is the most important one, the bin folder.
That's where all the binaries are.
This is where the actual compiler and the linker and the loader and all this good stuff is at.
So, this is the path that we want to add to Windows,
so that Windows can find this compiler,
whenever we need it.
So the easiest way to do that is, just click on this little folder right here.
And there's your path, you can see it c:/mingw64/bin.
I just want to right click on that and copy.
And at this point, I want to close down explorer because I'm done with it.
Now, what we want to do is
We want to set our Windows environment variable.
And again, this is really easy to do.
So I'm just going to come down to my taskbar
and just click the search and type environment.
And you can see right here it says, Edit the system, let me try that again.
There we go.
Edit the system environment variable, so I'm going to select that.
And I get this little window that pops up.
Let me move this out of the way.
There we go.
And you'll see this button right here, environment variables. That's what we want to select.
And I want to come down to my system variables down here
and look for the variable called Path, you can see it right there.
And this is the one that we want to edit. So I'm going to select the edit button.
And we've got a bunch of stuff in here.
And it's really important that you don't mess with anything that's in here
because that could really cause issues.
All we want to do is add a new path variable.
So I'm going to select new.
And right here, I'm just going to right click and paste what I copied earlier.
And now you can see that I've added the mingw64/bin
path to my existing path.
Perfect.
Click OK.
Click OK again.
And click OK once more.
That's it, our compiler is installed, we can test it really quickly.
Again, I'm going to press the Windows key
and I'm just going to type command CMD
and open up a command prompt window
and you can see it right here.
And all we have to do here is type g++ -- version
and press Enter.
And if our compiler is installed correctly, we should get information about the compiler.
And there's the information, you can see it 12.2,
0 was the version, we installed
and we're pretty much done installing the compiler.
If you type just g++, it'll say something about
fatal error, no input files, that's okay, that's a good install.
It's just telling you, hey, I don't know what to compile.
You haven't provided anything.
So if you type g++ and you get this
error here, it's okay, it's a normal error.
But g++ -- version is what we really want to type
to be sure that we've got our chamber, we installed. Okay?
So that's it, that takes care of installing the MinGW 64 compiler.
In the next video, we'll install Code Lite
and then we'll get Code Lite to talk to this compiler so that Code Lite
can use the compiler to compile our source code.
I'll see you in the next video.