使用 MingW-W64 编译支持的 Linux 项目

下载并安装MSys2和MingW-W64:

  • https://www.msys2.org/
  • http://mingw-w64.org/doku.php/download/mingw-builds/

准备环境:

  • (msys2) # pacman -Syu
  • (close terminal window)
  • (msys2) # pacman -Su
  • (msys2) # pacman -S diffutils (for cmp)
  • (msys2) # pacman -S make

编译:

  • (msys2)# export PATH=/c/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/bin:$PATH
  • (msys2)# ./configure –host=i686-w64-mingw32
  • (msys2)# make && make install