Download MinGW from https://sourceforge. net/projects/mingw. Double-click the downloaded file and follow the on-screen instructions to prepare the installation. When you get to the MinGW Installation Manager window, you’ll see several packages in the upper-right panel. Check the boxes next to “mingw32-base” and “mingw-gcc-g++. " Click the Installation menu and select Apply Changes. Click Apply.
Press the Windows key and type environment. Click Edit the system environment variables in the search results. Click the Environment Variables… button. Select the “Path” option under “System variables” and click Edit… Click New. Type C:\MinGW\bin and click OK. Click OK and OK again.
Once the prompt window is open, double-check that the compiler installed properly (and that the environment variables are set) by running the command gcc – version at the prompt. If you already had a command prompt window open, close it and open another so the path you added
Once the prompt window is open, double-check that the compiler installed properly (and that the environment variables are set) by running the command gcc – version at the prompt. If you already had a command prompt window open, close it and open another so the path you added
Once the prompt window is open, double-check that the compiler installed properly (and that the environment variables are set) by running the command gcc – version at the prompt. If you already had a command prompt window open, close it and open another so the path you added
Replace filename. c with the name of the file containing your C code, and filename. exe with the name you want to give the compiled program. Make sure you give the compiled program a name that ends with . exe. The -o flag specifies the output file.