Table of Contents
Objective: Install MinGW to compile an
and then create an
We will use MinGW to compile our assembly projects
Find the installer on MinGW’s site or download it from this site directly.
Note the default the installation directory and then press Continue.
MinGW might not work correctly if you install it in another directory other than the default.
So, we recommend using the default installation directory.
The installer will download and install MinGW.
Verify that the installer downloaded and installed all selected items.
mingw32-base-binand apply changes.
From the menu:
Installation ➜ Apply Changes
The installer might take a while depending on your internet connection.
Press the Close button when the packages finish downloading.
You can now close the installer window.
Windows needs to know where to find gcc.exe, which it will do by setting
Set the path to your compiler in the Windows path so that all applications can find it.
Otherwise, you have to specify the full path to the compiler.
This path is set ONLY for this CMD instance. You have to run the command again when you close the CMD window. Or, you can specify the absolute path to the file.
You can add it permanently the System Environment Variables.
Open up Command Prompt (CMD)
Set the temporary path by executing:
Verify the path set correctly
gcc --versionVerify that it displays the file version.
If you get a
not recognized error, then the path is not set correctly
or you installed MinGW in a different directory.
Try executing it using the full path:
Verify the installation path:
Open the Environment Variables for your account
In the start menu type:
edit environment variables for your account
Pathand then click the
Add an new path to
;C:\MinGW\binto the end of another path
Advanced System Propertiesin Windows. There are several ways:
Copy and paste one of these commands to Windows Explorer or Start Menu
Advanced System Settings
Navigate from the control panel:
Control Panel > System and Security > System
Click on the Environment Variables button
Pathunder User variables and then click on the Edit button
Click on New and then add a variable for the bin folder of GCC:
Press OK on all windows
Close and reopen the CMD windows to get a new prompt.
Verify that GCC display the versions correctly before continuing.