How To Install C++ In Windows Xp
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.
Scroll down a little fleck until you find the download button for the executable file.
Simply click on the installer button and save the installer file in any place you want.
Finish downloading the executable file. It should not have much time depending on your internet speed.
Later on downloading the file, we volition get this executable file.
Double click on the executable file. Then click Next
.
Keep the name equally it is, and click Next
.
Keep all this every bit it is, and click Adjacent
.
Requite it some time to terminate the installation process.
If you keep the checkmark, then the MSYS2 terminal will open once you click Cease
.
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:
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.
Type Y
and press the enter cardinal if you become this type of installation prompt.
Type Y
and printing the enter central.
The terminal will be airtight. Nosotros take to open the final manually and update the residuum of the packages.
Click the start button.
Search the binder named MSYS2 64bit. Click on the folder to expand and get the terminal. Open the terminal by clicking MSYS2 MSYS.
Update the remainder of the packages by applying the command, pacman -Su
.
If you get whatever installation prompt, so you need to type Y
or y
and printing the enter fundamental.
Await a piddling to finish the installation.
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.
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.
⚠️ 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.
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.
Wait for a trivial while.
Type Y
or y
and press the enter cardinal if yous get the installation prompts.
Give it some fourth dimension to end the installation process.
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.
If you get any installation prompt, then only type Y
or y
and press the enter key.
Give it some time to stop the installation.
You can shut the terminal.
How to Add the Directory to the Path of the Surround Variables
Open the file explorer.
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.
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.
We accept to go to the binary binder now. Go to the bin binder.
⚠️ If you lot are using a 32 bit operating organization, so you take to go into your mingw32 binder > bin folder.
Copy the directory.
⚠️ 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.
Click Surround Variables from the Avant-garde tab.
Click on Path and select that. Then click Edit.
A window will announced as below:
Click New.
A blank box will appear.
Paste the directory here.
Click OK.
Click OK.
Click OK.
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
For checking the G++ version:
yard++ --version
For checking the GDB version:
gdb --version
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