Build b / c characters failed to find zlib

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

I decided to use SSZipArchive . He uses minizip.

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 not found.

I tried adding -lz to other Linker flags and adding lybz.dylib, but that didn't help. Please let me know if you know how to get libz to work here.


Solved: Instead of using the folder, I made a yellow group of links, deleted / minizip / from turned on and now everything works.

+6
ios objective-c xcode ssziparchive
source share
2 answers

unzOpen , unzOpenCurrentFile and unzOpenCurrentFilePassword are functions defined in the minizip library. The component complains that it cannot find these functions, which means that they are not compiled or are not connected properly.

Make sure that minizip/unzip.c included in your project correctly and double check that it is compiled and linked.

+1
source share

The key to this is to make sure that

All .c files in the / minizip / section are added to Build Phases > Compiled Sources

enter image description here


For Cordoba developers who want to use SSZipArchive , make sure that you do not include the entire / minizip / folder as the source file in the plugin.xml file,

  <source-file src="src/ios/minizip"/> 

^^^^^^^^ No!

Include them separately like:

 <header-file src="src/ios/minizip/crypt.h" target="crypt.h" /> <source-file src="src/ios/minizip/ioapi.c" target="ioapi.c" /> <header-file src="src/ios/minizip/ioapi.h" target="ioapi.h" /> <source-file src="src/ios/minizip/mztools.c" target="mztools.c" /> <header-file src="src/ios/minizip/mztools.h" target="mztools.h" /> <source-file src="src/ios/minizip/unzip.c" target="unzip.c" /> <header-file src="src/ios/minizip/unzip.h" target="unzip.h" /> <source-file src="src/ios/minizip/zip.c" target="zip.c" /> <header-file src="src/ios/minizip/zip.h" target="zip.h" /> 
0
source share

All Articles