Zlib is an essential compression library that’s required by most open-source software. Download the Zlib source (zlib125.zip) and unpack it with unzip or 7zip. Then, compile Zlib like this:
cd zlib-1.2.5/
make -f win32/Makefile.gcc
Manually copy the files as follows:
cp -iv zlib1.dll /mingw/bin
cp -iv zconf.h zlib.h /mingw/include
cp -iv libz.a /mingw/lib
cp -iv libzdll.a /mingw/lib/libz.dll.a