访问 https://github.com/Zeranoe/mingw-w64-build, 下载mingw-w64-build 脚本。
在执行脚本的路径创建src和bld目录。
然后在Linux上,根据系统的类型,直接执行 mingw-w64-build i686或者mingw-w64-build x86_64,进行安装。
如果系统缺少某些组件,命令会报错如下:
mingw-w64-build: missing required program(s): g++ patch git
解决方案是:使用 yum install gcc-c++ patch git 即可。
然后,再次执行 mingw-w64-build x86_64,可启动mingw的安装。