Reinstall the zip package and try this:
import zip/zipfiles
{.passl: "-lz".}
var z: ZipArchive
if not z.open("test.zip"):
echo "Opening zip failed"
quit(1)
z.extractAll("test")
z.close()
If you keep giving error, download zlib: https://www.zlib.net/zlib-1.2.11.tar.gz
Unzip to the same location as your test.nim and use this code:
import zip/zipfiles
{.compile: ("zlib-1.2.11/*.c", "zlib_$#.obj").}
var z: ZipArchive
if not z.open("test.zip"):
echo "Opening zip failed"
quit(1)
z.extractAll("test")
z.close()
Both codes work here. The first uses libz.a present in the C compiler. The second compiles the zlib C files.