-2

currently i am trying to unzip the zip file and i am following the steps mentioned in this link http://www.nih.at/libzip/

but i am not getting zip.h header file , how to get that header file ?

Thank you.

fuz
  • 88,405
  • 25
  • 200
  • 352

2 Answers2

3

Assuming you are using Linux w/ GCC:
Build libzip (./configure && make), then include the libzip-1.1.2/lib directory in your project and include zip.h. In your compiler options, add -Ilibzip-1.1.2/lib and -l:libzip-1.1.2/lib/.libs/libzip.a.
For Xcode, set the previous options in your 'Other C flags' build setting. Building is done the same way in the terminal.

Mitsos101
  • 551
  • 3
  • 15
  • @AbhinandanDharmadhikari wants to add such a comment for this answer I think: "what if the person is using mac os? XCODE ? is the procedure is same? .." – tigris May 27 '16 at 11:35
2

You need to download the .tar.gz package, extract the contents of the package, then follow the instructions included in the package on building the library. After the install the zip.h header should be placed in a system folder /usr/local/include or usr/include on unix systems usually. Then you will need to make sure that you projects build system knows where to look for the header by setting the header search paths.

After all of that you an simply #include<zip.h>

Alex Zywicki
  • 2,263
  • 1
  • 19
  • 34