安装程序
https://sourceforge.net/projects/mingw/files/Installer/
Installing MinGW and MSYS
- Download and run mingw-get-inst
- Select "Use pre-packaged repository catalogues".
- Review and accept the License agreement.
- Please note that MinGW should be installed to a directory path that doesn't contain any spaces. This method has been tested with a directory path of C:\MinGW.
- Select C++ Compiler and MSYS Basic System as optional components.
- Wait until every package has been downloaded and installation is finished.
Setting up MSYS
Go to your MSYS folder (found at <MinGW installation folder>\msys\1.0, C:\MinGW\msys\1.0 in this example),
open etc\fstab with a text editor (for example Notepad) and add the following line at the end of the file:
C:\MinGW\ /MinGW
C:\MinGW\ /usr/local
启动 MSYS
msys.bat
mingw-get install msys-wget mingw-get install msys-unzip mingw-get install msys-patch
====================================================================================================================================
Libraries
ZLIB
Compiling zlib uses a slightly different process.
make -f win32/Makefile.gccBINARY_PATH=/mingw/bin INCLUDE_PATH=/mingw/include LIBRARY_PATH=/mingw/lib