DEV Community

Prem
Prem

Posted on

How to install make on windows

Installing make on Windows involves using tools like MinGW or Cygwin to provide a Unix-like environment that includes the make utility. Here's a step-by-step guide using MinGW:

  1. Install Chocolatey (Optional but Recommended): Chocolatey is a package manager for Windows that makes it easy to install software from the command line.

Open a Command Prompt with administrator privileges and run the following command to install Chocolatey:

   Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex (iwr https://chocolatey.org/install.ps1)
Enter fullscreen mode Exit fullscreen mode
  1. Install MinGW: MinGW (Minimalist GNU for Windows) is a development environment that provides a Unix-like command-line environment on Windows.

Run the following command in the Command Prompt to install MinGW using Chocolatey:

   choco install mingw -y
Enter fullscreen mode Exit fullscreen mode
  1. Add MinGW Bin Directory to PATH: After installing MinGW, you need to add its bin directory to your system's PATH environment variable.
  • Right-click on "This PC" or "My Computer" and select "Properties."
  • Click on "Advanced system settings."
  • In the "System Properties" window, click on the "Environment Variables" button.
  • Under the "System variables" section, find and select the "Path" variable, then click the "Edit" button.
  • Click the "New" button and add the path to the MinGW bin directory (usually C:\MinGW\bin).
  • Click "OK" to close all the windows.
  1. Verify Installation: To verify that make has been successfully installed, open a new Command Prompt and run the following command:
   make --version
Enter fullscreen mode Exit fullscreen mode

You should see the version information of the make utility if the installation was successful.

That's it! You've now successfully installed make on your Windows system using MinGW. You can now use the make command to build projects that use Makefiles for compilation and other tasks.

Top comments (0)