MinGW Compiler Suite Installation for C / C++ Programming ( Windows )


Hi this is Anil from learning lad and welcome
to another video tutorial on C programming language and in this video we will see how we can download
and install mingw. now this mingw is a free open source software
development environment to create Microsoft Windows applications. This mingw comes with the GNU toolchain you
know it contains the GCC compiler, which support the languages like ‘c’ ‘c++’ ‘ada’ ‘fortran’
and ‘objective C’ etc etc. So to install this mingw in your Windows machine,
first you need to open up any of the browser. I have the Chrome here and I’m gonna open
up Google Chrome and in the URL bar you need to type in mingw.org and then hit the enter
button and it will open up this mingw website. so here you guys can see mingw stands for
minimalist GNU for Windows and it is a minimalist development environment for native Microsoft
Windows applications and it comes with GNU tool chain, which comes to the GCC, you know
the GNU compiler collection which supports languages like ‘C’ ‘C plus plus’ ‘ada’ ‘fortran’
and etc etc. so to install this, you need to click on this
download installer and then it will take you to another page and you know the download
will start from sourceforge. Now what we are downloading, it is just a
setup file. it is not the installer. so you need to run this setup file in your
computer and then the installer will be downloaded and then this mingw will be installed in your
machine. so the download has been finished and now
I’m gonna close this window. now the mingw setup that we have downloaded,
is stored in your default download location and mine is the downloads folder. so i’m gonna open up that folder and here
you guys can see, we have this mingw get setup. so I just need to double click here on this
one and you know it says it is not verified. do you want to run this. Yes we do want to run this. click on that run and then I here you guys
can see some information about the mingw. and if you want you can view the license and
then once you are done with all those things you can click on this install and let it install
in the default directory which is C:MinGW and then click on this continue. Now it will download the MinGW installation
manager and then we can download and install tools. so just wait for the download to finish. now here you know, for this installation you
need the internet connection. now if you don’t have access to internet connection
in your computer then you guys can install this minGW and you can install it along with
the code blocks IDE. And in the next video we will be downloading
and installing codeblocks IDE and at that time I will tell you how you can download
and install this mingw along with that code blocks and at that time you don’t need the
internet connection in your computer to install that. So I can download it from somewhere else And
install this MinGW along with code blocks IDE in your computer. so now we’re waiting for this download to
finish. All right now and some of the files have been
downloaded and this continue button is been enabled now. so we just gonna click on this continue. And now you know this allows us to install
the required packages. so now if you just click on these things, then
it will give you all the and details here. but here we are focusing on installing the
tools for c and also we will install at the tools for C plus plus also. now here we are going to install this mingw
32 base and this mingw GCC G plus plus. so this mingw 32 base, if I click on that,
you know it says this will install the C compiler, linker and other binary tools and also we
will be downloading and installing the tools for creating the programs in C plus plus. And that’s why we need to install this mingw
gcc g++ also. so after learning this C language if you want
to move on to C plus plus then you know you don’t need to download and install these tools
again. so we are just installing both of them at
the same time. so to install these two packages, we need
to check this checkbox and to do that if I click on this check box then you know this
options menu appears and we need to mark for installation after that we are gonna select
this mingw gcc g++ and we will mark this one also for installation and after marking these
two we will go for this installation in this menu and we need to click on this apply changes. now it says ok to proceed, we say apply. Now this will download and install the tools
which are required to to create the applications using c and C plus plus language. All right. now the installation has been completed you
know it says here all changes were applied successfully. you may now close this dialogue. so it took some time to download and install
all these things and also the installation speed also depends on the internet connection
speed. Since now this installation has been finished,
we are gonna click on this close. Here if you want any other programs or any
other packages then you can mark that and you know click on this apply changes and those
packages will be installed. now here after that we are gonna close this
window. now we are gonna close this folder also. Now we have successfully downloaded and installed
the mingw in our computer. All right, now the next thing that we want
to do is we want to set the path environment variable so that we can access this mingw
from any folder. so first we need to open up the folder where
we have installed the mingw. if you remember then it was ‘C’ and mingw
folder. so I’m gonna open up the partition ‘C’ and
here you guys can see mingw folder i’m gonna double click on that and after that you need
to open this Bin folder, double click on that bin folder and here what you need to do is
you need to Copy the location. so just click on this address bar here and
then copy the location. Which is ‘C:MinGWbin’ just copy that and then you can close it. and then you can open up the Windows Explorer. just double click on this ‘This PC’ icon and
this page will be opened you guys can see the partitions. and after here in the empty area right click
and go to properties and here this system properties Window will open. You know you can open it by going to control
panel, then system and security and then system. and then here click on this advanced system
settings and this system properties window will open and here you guys can see environment
variables. just click on that and here we can set the
environment variables for the specific user or for the entire system. I’m gonna set it up for this specific user. just because I have some other users in this
computer and they really don’t do the programming. so here i’m gonna set it up for this user
Anil, Anil is my user account name and here for this user Anil you guys can see the Path
TEMP and TMP environment variables. you need to select path in your computer and
then click on edit and then here you need to append not replace this value. so after the semicolon, just paste whatever
the content you have copied which is ‘C:MinGWbin’ and after that add a semicolon and after that
click on Ok and then you can click on this ok again and click on OK then close this window. now i’m gonna close this folder also. now we have set the path environment variable. now let us see whether we have downloaded
and installed this properly or not. For that purpose you need to open up the command
prompt. just search for CMD and you guys can see the
command prompt. just open it up. and here just type in gcc space minus minus
version. then hit the enter button. You guys can see the GCC version you know
which says GCC 6.3.0 now here if you get any error message then
its gonna mean that you have done mistake while doing installation or while setting
up the path environment variable. So you need to watch this video again and
follow all those steps properly. And once you get this kind of message you
know this version may vary depending on when you are installing the software. but you know, you need to see this information
about GCC here and once you get this, it means that you know you have installed everything
properly. so now you can close it okay all right now this is how you guys can
download and install the minGW in your computer and in the next video we will see how we can
download and install the codeblocks IDE and set it up with this minGW. So thank you for watching. If you like this video then give a Thumbs
up and do share this video if you think that this video will help any of your friends and
if you want to watch more tutorials then subscribe to my channel and thank you for watching and
I’ll see you later.

52 thoughts on “MinGW Compiler Suite Installation for C / C++ Programming ( Windows )

  1. after installing mingw,, using notepad wrote a simple hello world c source file and saved with .c extension. Next for compilation opened command prompt , successfully compiled but for execution an error displayed some "." is not recognised ?? so how to execute now

  2. Thank you for this amazing video. I think people take these type of tutorials for granted. They just see installing a compiler as a boring thing but it's actually very essential and good to know how you install a pretty standard compiler. Thank you, regards Valentin!

  3. Hi thank you for your effort, am living in Sudan- Africa, when I tried to download MingW I received message it's forbidden . is there any otherway please?

  4. Hey man can you please give some help since you are the expert in this area. My email is [email protected] I tried everything, but so far eclipsed installed on my computer is not working right.

  5. i have downloaded and installed everything for mingw but it is showing error message…..im unable to understand the pro5

  6. Your effort is nice. But it feels dry and boring and dead. There's no expression and energy in what you say. But good work till now.

  7. it says…. gcc is not recognized internal or external command,operable program or batch file…in the cmd
    ….what does it means????

  8. In the advanced system settings,there is no option called path,theres is only temp and tmp,what to do?

  9. problem with path?…… click on edit in system variables and not on user variable…..click new…paste the path …hit ok

  10. problem with path?…… click on edit in system variables and not on user variable…..click new…paste the path …hit ok

  11. Hello Sir,
    I tried installing the MinGw 3 times. But in the command prompt it is showing that
    'gcc' is not recognized as an internal or external command,
    operable program or batch file.

    Please share a link describing another type of tool

  12. C:Usersprash>gcc –version
    'gcc' is not recognized as an internal or external command,
    operable program or batch file. showing this problem what to do sir?

  13. 'gcc' is not recognized as an internal or external command,
    operable program or batch file.

    after following your all steps in the last having this ! what to do?
    gimme reply as soon?

  14. Hi Everyone if anyone facing a problem like path variable not showing then the answer is go to environment variable Create a path variable and see the user variable list the one with starts with %USERPROFILE EDIT copy and paste at new path variable location and also copy the bin folder location and save ….then run cmd…Thanks u so much sir for this my new learning…

  15. Help me in code blocks
    At the last step when I build and run the hello world program
    Output :process returned 4258096(0×40F930)
    "hello world "doesn't appear .

Leave a Reply

Your email address will not be published. Required fields are marked *