My requirement is to unzip a zip file I am receiving from the server on Linux platform.
Now my C/C++ code should unzip the folder to receive the json files.
I did my research online and found I can use zlib library for this purpose, but zlib can not unzip a .zip file but it has in its contrib folder minizip which can be used for this purpose.
Referred: Simple way to unzip a .zip file using zlib
I downloaded zlib source file:
zlib source code, version 1.2.8, zipfile format (678K, MD5 checksum 126f8676442ffbd97884eb4d6f32afb4) from http://www.zlib.net/
Now I go to zlib-1.2.8\contrib\minizip and try to compile miniunz.c
I try make all but getting below error:
[@DELL-BUILD03 minizip]$ make
cc -c -O -I../.. miniunz.c
cc -c -O -I../.. unzip.c
cc -c -O -I../.. ioapi.c
make: *** No rule to make target `../../libz.a', needed by `miniunz'. Stop.
I tried manually placing a pre compiled libz.a in zlib-1.2.8 folder.
But still the same error.
How do I proceed and unzip a sample json.zip folder?