Mingw 32 configuration in Windows
First, go to the mingw Official Website: htttp: // www.mingw.orgnow mingw5.16.exe
Download the package and decompress it online. Do not install it in the subdirectory of other files during installation,
Cannot be installed in the Program Files directory. After decompression, you will see that the downloaded file contains
- Binutils-assembler, linker ,...
- Mingw-runtime-headers and libraries for the C library
- W32api-Windows API header files and libraries
- Gcc-core-C Compiler
- Gcc-G ++-C ++ Compiler
- Gcc-objc-Objective C Compiler
- Gcc-gfortran-Fortran 90 Compiler
- Gcc-java Compiler
- Gcc-Ada Compiler
- Make File
- But it does not have GDB and the make that comes with mingw cannot be used. In fact, it is in its Bin
- With mingw32-make.exeand no make.exe, you can run the command in cmd.
- You still cannot compile the C ++ language.
Therefore, you also need to download GDB and msys from the mingw official website. The msys version is 1.0.
Before installing msys, You need to configure the mingw environment variable, that is, add the mingw bin directory
To the end of path.
GDB directly decompress and overwrite it to the mingw directory. After installation, You need to test the environment.
The command line in cmd cannot test make -- version. You can use msys to test,
In fact, msys simulates Linux Command lines in windows.
If G ++ -- v.
GCC -- V
GDB -- V
Make -- V
If no error occurs, the installation is successful. You can write a C program for testing.
GCC and G ++ are the C and C ++ compilers respectively.
For example, GCC-C hello. c