banner



How To Install C++ In Windows Xp

How to Install C and C++ Compilers on Windows

If you want to run C or C++ programs in your Windows operating organisation, then you need to have the right compilers.

The MinGW compiler is a well known and widely used software for installing GCC and G++ compilers for the C and C++ programming languages.

But many devs face difficulties when installing the compiler, and so I am going to show you all the steps to do then in this article with screenshots to aid you get it done.

I will exist using Windows 11, but the same process is applicative for all other Windows operating systems unless you are using Windows XP (You demand to change some steps in Windows XP).

Install MSYS2

Firstly we need to download an executable file from MSYS2. Go to the official website of MSYS2: https://www.msys2.org/. The website looks like below every bit of today.

Screenshot--8-

Scroll down a little fleck until you find the download button for the executable file.

Screenshot--9-

Simply click on the installer button and save the installer file in any place you want.

Screenshot--10--1

Finish downloading the executable file. It should not have much time depending on your internet speed.

Screenshot--11-

Later on downloading the file, we volition get this executable file.

Screenshot--12-

Double click on the executable file. Then click Next.

Screenshot--13-

Keep the name equally it is, and click Next.

Screenshot--14--1

Keep all this every bit it is, and click Adjacent.

Screenshot--15-

Requite it some time to terminate the installation process.

Screenshot--16-

If you keep the checkmark, then the MSYS2 terminal will open once you click Cease.

Screenshot--17-

I prefer to do information technology this way, but if yous want to do the remaining tasks later, so you need to open the terminal by yourself from the start carte du jour.

In that example, yous take to click the start button > Search for MSYS2 and click on the final like in the post-obit picture:

Screenshot--26-

Allow me presume that we have opened the MSYS2 MSYS last successfully.

Apply the command pacman -Syu to update the bundle database and the base of operations packages.

Screenshot--19-

Type Y and press the enter cardinal if you become this type of installation prompt.

Screenshot--20-
Screenshot--21-
Screenshot--22-

Type Y and printing the enter central.

Screenshot--23-
Screenshot--24-

The terminal will be airtight. Nosotros take to open the final manually and update the residuum of the packages.

Click the start button.

Screenshot--25-

Search the binder named MSYS2 64bit. Click on the folder to expand and get the terminal. Open the terminal by clicking MSYS2 MSYS.

Screenshot--26--1

Update the remainder of the packages by applying the command, pacman -Su.

Screenshot--27-

If you get whatever installation prompt, so you need to type Y or y and printing the enter fundamental.

Screenshot--28-
Screenshot--29-

Await a piddling to finish the installation.

Screenshot--30-
Screenshot--31-

Close the window subsequently finishing the installation.

Install the 1000++ and Thousand++ Compilers

Click the start button. Notice the MSYS2 64bit folder. Click on that folder to expand it.

Screenshot--32-

If you are using a 64 bit operating system like I am, and so nosotros need to use the MSYS2 MinGW x64 concluding. Click on the terminal to open up that.

Screenshot--33-

⚠️ Only, if you are using a 32 scrap operating system, then y'all have to apply the MSYS2 MinGW x86 terminal. Then, y'all need to open up that terminal.

Screenshot--34-

As I am using a 64 bit operating system, I have opened the terminal for 64 bit. Apply the control pacman -S mingw-w64-x86_64-gcc to install the compilers.

⚠️ If you lot are using a 32 bit operating organisation, then you have to apply the control pacman -Southward mingw-w64-i686-gcc in your 32 bit concluding.

Screenshot--35-

Wait for a trivial while.

Screenshot--36-

Type Y or y and press the enter cardinal if yous get the installation prompts.

Screenshot--37-
Screenshot--38-

Give it some fourth dimension to end the installation process.

Screenshot--39-
Screenshot--39--1

Yous've now finished installing the compilers.

How to Install the Debugger

If you are using a 64 bit operating organization like I am, so y'all accept to utilise the control pacman -South mingw-w64-x86_64-gdb.

⚠️ If y'all are using a 32 scrap operating organization, then y'all have to apply the control pacman -South mingw-w64-i686-gdb in your 32 flake terminal.

Screenshot--41-

If you get any installation prompt, then only type Y or y and press the enter key.

Screenshot--42-
Screenshot--38--1

Give it some time to stop the installation.

Screenshot--44-
Screenshot--45-

You can shut the terminal.

How to Add the Directory to the Path of the Surround Variables

Open the file explorer.

Screenshot--46-

I am assuming that you accept installed the MSYS into the default directory like I have. If you used custom directories, then you need to become to the directory where you installed it.

Screenshot--47-

If you are using a 64 bit operating system similar I am, and then go to the mingw64 binder.

⚠️ If yous are using a 32 bit operating system, then go to the mingw32 folder.

Screenshot--48-

We accept to go to the binary binder now. Go to the bin binder.

Screenshot--49-

⚠️ If you lot are using a 32 bit operating organization, so you take to go into your mingw32 binder > bin folder.

Copy the directory.

Screenshot--51-

⚠️ If you are using a 32 scrap operating organization, and you lot as well installed the MSYS2 in the default directory, then your directory should exist like the following:

                C:\msys64\mingw32\bin              

Open up the Avant-garde System Settings. Y'all can do that in many ways. A simple fashion is to only click the start push and search for it like the below screenshot.

Screenshot--52-

Click Surround Variables from the Avant-garde tab.

Screenshot--54-

Click on Path and select that. Then click Edit.

Screenshot--57-

A window will announced as below:

Screenshot--58-

Click New.

Screenshot--59-

A blank box will appear.

Screenshot--60-

Paste the directory here.

Screenshot--61-
Screenshot--62-

Click OK.

Screenshot--63-

Click OK.

Screenshot--65-

Click OK.

Screenshot--66-

If y'all desire to get all the steps in a video, then you tin can watch this video also.

Bank check the Install

Now information technology is time to check whether nosotros have successfully installed all of the above or non.

Open the terminal / PowerShell / CMD and apply the commands serially:

For checking the GCC version:

                gcc --version              
Screenshot--68-

For checking the G++ version:

                yard++ --version              
Screenshot--69-

For checking the GDB version:

                gdb --version              
Screenshot--70-

Conclusion

I hope this article helps you install your compilers on the Windows operating system for C and C++ programs.

Thanks a lot for reading the entire commodity. If you take whatsoever suggestions and then y'all may make it touch with me through my twitter or LinkedIn accounts.

If y'all are into open source, so y'all can likewise follow me on GitHub as I am very active in contributing to open source projects.

If y'all like programming-related tutorials, so I have two YouTube channels. In one channel, I publish Bengali content regularly, whereas I publish English language content regularly in my other aqueduct.

Have a wonderful day!



Larn to lawmaking for costless. freeCodeCamp's open source curriculum has helped more xl,000 people become jobs as developers. Become started

Source: https://www.freecodecamp.org/news/how-to-install-c-and-cpp-compiler-on-windows/

Posted by: duganwoured.blogspot.com

0 Response to "How To Install C++ In Windows Xp"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel