We use MSYS2 to do that.
Download MSYS2 and install it.
Run MSYS2 executable. It may take a while. Upgrade the system:
If needed, close MSYS2, run it again from Start menu. Update the rest with:
With pacman, install gcc, make, base-devel, zlib and zlib-devel:
pacman -S gcc make base-devel zlib zlib-devel
ad.exe (and other files present in the
usr/x86_64-pc-msys/bin folder inside the msys install folder) are also present in
usr/bin. Else copy them (and rename
ld.exe inside the usr/bin folder). This problem occurs on fat system. NTFS should not cause it.
Download and extract minimap2 zip file from the repository
Start MSYS2 console, go to minimap2 source folder.
minimap2.exe file in a folder. Copy in the same folder
msys-z.dll files from the
usr/bin folder of the MSYS2 install folder.
That's right! Always keep minimap2.exe in the same folder as the dll files.