DEV Community

Cover image for How to setup gcc on your PC (For Windows)

Posted on

How to setup gcc on your PC (For Windows)

Hello there, in this article we will be discussing about setting up our system for c/c++ development by using tools like VS code, gcc compiler etc…

Step 1

Downloading required applications

We will start by first downloading the files that we need from the internet so make sure you are connected to the internet and then click on the following links:-

That's it now download both these files and install it simply by using their wizards/installers and it will be very easy too.

After you have succesfully installed both of the applications move to Step 2.

Step 2

Setting up your environment variables

For setting up the environment variable go to

1. Search "Advanced settings" in search bar

Advanced Settings

2. Open the “environment variables” window, click on the PATH variable and click on “Edit”

Opening env variables

3. Click on the “New” button and add the 2 following directories to your PATH

If you have not changed anything manually then add this path here
Enter fullscreen mode Exit fullscreen mode

Adding PATH

We are all done setting up, and if you followed it correctly move on to STEP 3 to confirm.

Step 3

Checking the installation of gcc on our system

Fire up a terminal by typing "cmd" in your search bar and a window terminal should open and now just type

Enter fullscreen mode Exit fullscreen mode

and if installation is correct, you should get something like this on your terminal

gcc: error: unrecognized command line option--v; did you mean--d?
gcc: fatal error: no input files
compilation terminated.

Enter fullscreen mode Exit fullscreen mode

with this we have succesfully set up our gcc compiler on our system and we are ready to tun C/C++ program on our PC.

If you face any problems following this article, feel free to ask me in the comments.

Thank you for Reading ☺️☺️☺️

Top comments (0)