Your c compiler cannot find zlib.h Either install it correctly or point the c compiler to the correct folder.
Then I bet the next issue will be a linker error, then you must also link to the zlib library.
I successfully resolve the issue by installing MinGW-W64 manually with the following parameters. version:8.1.0 Arch: x86_64 Threads:win32
But I can't understand why it is not working with the Mingw from finish.exe. The MinGW from finish.exe installation includes zlib1.dll.