Overview
[MinGW]((http://www.mingw.org/), a contraction of “Minimalist GNU for Windows”, is a minimalist development environment for native Microsoft Windows applications.
MinGW includes:
- A port of the GNU Compiler Collection (GCC), including C, C++, ADA and Fortran compilers;
- GNU Binutils for Windows (assembler, linker, archive manager);
- A command-line installer, with optional GUI front-end, (mingw-get) for MinGW and MSYS deployment on MS-Windows;
- A GUI first-time setup tool (mingw-get-setup), to get you up and running with mingw-get.
Download
Download MinGW
Installation
Select Package
- mingw-developer-toolkit
- mingw32-base
- mingw32-gcc-g++
- mysy-base
Click: Installation > Apply Changes
Set up environment variables
Name | Value |
---|---|
C_INCLUDEDE_PATH | C:\MinGW\include |
LIBRARY_PATH | C:\MinGW\lib |
Path | C:\MinGW\bin |
Debug test.c
with cmd
Create a new text code.
1 |
|
Call gcc in cmd.
gcc test.c -o test
Setup Sublime Text 3
Build a new System
Click: Tools > Build System > New Build System
Code:
1 | { |
Save as C.sublime-build
Compile and Run
Press Ctrl + Shift + B
to compile and run, or just press Ctrl + B
to run (if it has been compiled).