Install the MinGW-w64

Install the MinGW-w64

1.Download the MinGW-w64

Official website address:

http://www.mingw-w64.org/doku.php/download


Download address:

https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/mingw-w64-install.exe/download

2. Install the MinGW-w64

Follow the settings as shown.

Choose the installation folder




3. Setting the environment variables

The path: the bin directory of the MinGW-w64 directory.

In Order to test whether the MinGW-w64 is configured successfully, execute the commond in the cmd.

1
gcc -v

4. Compile the source code and generate the executable file(gcc or g++)

Compile the source code

1
gcc hello.c
1
g++ hello.c

Compile the source code and generate the executable file

1
gcc hello.c -o hello_world.exe
1
g++ hello.c -o hello_world.exe