Epub file error in object c

I am new to iPad developer and I want to create an ePub file in my project,

I downloaded a sample epub file from here and I'm stuck with a problem.

I get these errors in my project ...

ld: warning: ignoring file /Users/krunal/Downloads/EpubReader/libz.1.2.3.dylib, missing required architecture i386 in file Undefined symbols for architecture i386: "_inflateEnd", referenced from: _unzCloseCurrentFile in unzip.o "_inflateInit2_", referenced from: _unzOpenCurrentFile3 in unzip.o "_get_crc_table", referenced from: _unzOpenCurrentFile3 in unzip.o _zipOpenNewFileInZip3 in zip.o "_crc32", referenced from: _unzReadCurrentFile in unzip.o _zipWriteInFileInZip in zip.o -[ZipArchive addFileToZip:newname:] in ZipArchive.o "_inflate", referenced from: _unzReadCurrentFile in unzip.o "_deflateInit2_", referenced from: _zipOpenNewFileInZip3 in zip.o "_deflate", referenced from: _zipWriteInFileInZip in zip.o _zipCloseFileInZipRaw in zip.o "_deflateEnd", referenced from: _zipCloseFileInZipRaw in zip.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) 

How to solve this error, any idea?

Thanks in advance...

+6
source share
1 answer

The logs seem to indicate that the problem comes from the framework of libz.1.2.3.dylib.

What iOS SDK are you using (and which version of Xcode)?

In your project, click on your goal and go to the "Build Phases" tab, then the "Link to Libraries" section.

Try removing the libz.1.2.3 structure, and then re-add libz.1.2.5 (click on the small "+" at the bottom of the window and select libz.1.2.5 from the list).

EDIT:

As indicated by Abizern below, add libz.dylib instead of libz.1.2.5.dylib to do the trick. This should be a link to the latest lib version (see this question and answers here ).

+12
source

Source: https://habr.com/ru/post/907833/


All Articles