views:

48

answers:

1

I have a problem adding libs for zip extraction to my iPhone app.

I decided to use SSZipArchive. It uses minizip.

After following the instructions:

1 Add SSZipArchive.h, SSZipArchive.m, and minizip
added minizip

2 Add the libz library to your target
added libz

I still get errors:
alt text

Symbol(s) not found.

I tried adding -lz to Other Linker Flags and adding lybz.dylib but it didn't help. Please let me know if you know how to get libz to work here.


Solved: Instead of using a folder, I made a yellow reference group, removed /minizip/ from includes and now everything works.

+1  A: 

unzOpen, unzOpenCurrentFile, and unzOpenCurrentFilePassword are functions defined in the minizip library. The linker is complaining that it can't find those functions, which means they're not getting compiled or linked in properly.

Make sure that minizip/unzip.c is included in your project properly and double-check that it's getting compiled and linked.

Adam Rosenfield
I think minizip is linked OK. When I rename minizip folder to something else I get an error that Minizip/unzip.h cannot be found. Is there another test in xcode?
Alex L
He said minizip.c, not minizip.h. Not the same thing.
Turtle
Thanks, I tried adding minizip.c from the official minizip site. But it's trying to # include <direct.h> and <io.h>. No such file error.
Alex L