epub file error in objective c - iphone

I am new to iPad developer and i want to create ePub file in my project,
I downloaded sample epub file, from here
and im stuck with a problem.
i am getting this 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 errors, any idea ?
Thanks In Advance !!

The logs seem to indicate that the problem is coming from the libz.1.2.3.dylib framework.
What iOS SDK are you using (and which Xcode version) ?
In your project, click on your target and go to the Build Phases tab, then "Link binary with libraries" section.
Try removing the libz.1.2.3 framework and then re-adding the libz.1.2.5 (click on the little "+" at the bottom of the window and select libz.1.2.5 from the list).
EDIT:
As stated by Abizern in below comment, adding libz.dylib instead of libz.1.2.5.dylib should do the trick. This should link to the latest version of the lib (see this question and answers here).

Related

embedding cocos2d in storyboard project

I have a running cocos2d project and a running ios storyboard project that both run without errors , when i try to embed cocos2d project into the main project i have the following errors (After disabling ARC and adding required frameworks ):
Undefined symbols for architecture i386:
"_gzclose", referenced from:
_ccInflateGZipFile in ZipUtils.o
"_gzopen", referenced from:
_ccInflateGZipFile in ZipUtils.o
"_gzread", referenced from:
_ccInflateGZipFile in ZipUtils.o
"_inflate", referenced from:
_inflateMemoryWithHint in ZipUtils.o
"_inflateEnd", referenced from:
_inflateMemoryWithHint in ZipUtils.o
"inflateInit2", referenced from:
_inflateMemoryWithHint in ZipUtils.o
"_uncompress", referenced from:
_ccInflateCCZFile in ZipUtils.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Add the libz.dylib library to the Link Binaries build phase or add -lz as other linker flag in Build Settings. Both will ensure the app is linked with the zip library needed by cocos2d.

Undefined symbols for architecture i386

while i am trying to build my iOS project where iam using storyboard .
Also using transition and animation classes in my project.
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_FooterView", referenced from:
objc-class-ref in WallViewController.o
"_OBJC_CLASS_$_FullScreenView", referenced from:
objc-class-ref in WallViewController.o
"_OBJC_CLASS_$_HeaderView", referenced from:
objc-class-ref in WallViewController.o
"_OBJC_CLASS_$_LayoutViewExtention", referenced from:
objc-class-ref in WallViewController.o
"_OBJC_CLASS_$_MessageModel", referenced from:
objc-class-ref in WallViewController.o
"_OBJC_CLASS_$_TitleAndTextView", referenced from:
objc-class-ref in WallViewController.o
"_RGBACOLOR", referenced from:
-[WallViewController showViewInFullScreen:withModel:] in WallViewController.o
-[WallViewController animationEnd:finished:context:] in WallViewController.o
-[AFKPageFlipper initFlip] in AFKPageFlipper.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It is difficult to analyse such questions without a project at your eyes. But as they are linker errors and you seem to use one of the latest Xcodes and WallViewController is not standard UIKit class (as far as i know(there is no 'UI' prefix)), i guess that you included the files improperly.
Try to delete references to the WallViewController files and add them again into the project by right clicking the group where you want to put them and then "add files..." (my xcode doesn't like dragging for some unknown reason).
Pls have look at link.
Select project and goto build phase and add the missing file "WallViewController.m" to compile source.

Why is CoreData not linking in my ported iOS->Mac App?

I'm porting an app from the iOS side to the Mac side and I'm having an annoying linking error where the linker appears to be trying to use the iOS version of the coredata framework instead of the (x86_64) one. I've deleted the framework and re-added it and know I'm adding the mac version. I've also regenerated my model classes. I'm getting this error:
ld: warning: ignoring file /Users/xxxxx/xcode_projects/xxxxx/CoreData.framework/CoreData, file was built for unsupported file format which is not the architecture being linked (x86_64)
Undefined symbols for architecture x86_64:
"_NSSQLiteStoreType", referenced from:
-[CoreDataSingleton persistentStoreCoordinator] in CoreDataSingleton.o
"_NSInferMappingModelAutomaticallyOption", referenced from:
-[CoreDataSingleton persistentStoreCoordinator] in CoreDataSingleton.o
"_NSMigratePersistentStoresAutomaticallyOption", referenced from:
-[CoreDataSingleton persistentStoreCoordinator] in CoreDataSingleton.o
"_OBJC_CLASS_$_NSManagedObjectContext", referenced from:
objc-class-ref in CoreDataSingleton.o
"_OBJC_CLASS_$_NSManagedObjectModel", referenced from:
objc-class-ref in CoreDataSingleton.o
etc...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any suggestions would be helpful, thanks,
Nick
Link errors usually mean you aren't including a framework in the project.
In the "Link Binary With Libraries" section of the "Build Phases" tab of the build settings for your project, make sure CoreData.framework is listed. If not, press the "+" button and select it.

Error:Apple Mach-O Linker (Id) Warning

In my app I have been working to import and export the database.
I have imported some files which is required for this functionality but when i try to run the app in simulator the errors listed below occurs. I can't understand which type of errors are these. so plz help me solve this problem.
Undefined symbols for architecture i386:
"_inflateInit2_", referenced from:
-[NSData(NSDataExtension) gzipInflate] in NSData+CocoaDevUsersAdditions.o
"_inflate", referenced from:
-[NSData(NSDataExtension) gzipInflate] in NSData+CocoaDevUsersAdditions.o
"_inflateEnd", referenced from:
-[NSData(NSDataExtension) gzipInflate] in NSData+CocoaDevUsersAdditions.o
"_deflateInit2_", referenced from:
-[NSData(NSDataExtension) gzipDeflate] in NSData+CocoaDevUsersAdditions.o
"_deflate", referenced from:
-[NSData(NSDataExtension) gzipDeflate] in NSData+CocoaDevUsersAdditions.o
"_deflateEnd", referenced from:
-[NSData(NSDataExtension) gzipDeflate] in NSData+CocoaDevUsersAdditions.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
You didn't include the libz.tbd where those functions are. Select the project node, select your target, go to the Build Phases tab, expand "Link Binaries With Libraries", add libz.dylib, and try again.
Add libz.dylib to your framework, it will work..
I faced the same issue, and thanks to Jano, it was resolved after I added the Libz.dylib to the project.

Help me out With Error _deflateInit2_

ld: warning: directory not found for option '-L/Users/photon/Desktop/Walg-19-aug/WalgreensIPAD_1.0.3/iPad/Walgreens/../ZXingWidget/build/Debug-iphonesimulator'
ld: warning: directory not found for option '-L/Users/photon/Desktop/Walg-19-aug/WalgreensIPAD_1.0.3/iPad/Walgreens/../ZXingWidget/build/Debug-iphoneos'
ld: warning: directory not found for option '-L/Users/photon/Desktop/Walg-19-aug/WalgreensIPAD_1.0.3/iPad/Walgreens/../ZXingWidget/build/Release-iphoneos'
ld: warning: ignoring file /Users/photon/Desktop/Walg-19-aug/WalgreensIPAD_1.0.3/iPad/Walgreens/libOmnitureAppMeasurement-iPhoneDevice.a, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: ignoring file /Users/photon/Desktop/Walg-19-aug/WalgreensIPAD_1.0.3/iPad/Walgreens/libOmnitureAppMeasurement-iPhoneSimulator_4_0_GM.a, file was built for unsupported file format which is not the architecture being linked (i386)
Undefined symbols for architecture i386:
"_deflateInit2_", referenced from:
-[ASIDataCompressor setupStream] in ASIDataCompressor.o
"_deflateEnd", referenced from:
-[ASIDataCompressor closeStream] in ASIDataCompressor.o
"_deflate", referenced from:
-[ASIDataCompressor compressBytes:length:error:shouldFinish:] in ASIDataCompressor.o
"_inflateInit2_", referenced from:
-[ASIDataDecompressor setupStream] in ASIDataDecompressor.o
"_inflateEnd", referenced from:
-[ASIDataDecompressor closeStream] in ASIDataDecompressor.o
"_inflate", referenced from:
-[ASIDataDecompressor uncompressBytes:length:error:] in ASIDataDecompressor.o
"_OBJC_CLASS_$_OMAppMeasurement", referenced from:
objc-class-ref in OmnitureService.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++-4.2 failed with exit code 1
i got this error Even i Included the libz1.2.5.dylib into my project.
I am working in X-Code 4.2 for IOS Beta Version
# All
Any one please tell problem solving.
EDIT : As of Xcode 7 libz.dylib has been renamed to libz.tbd
I fix this problem by add libz.dylib to Link Library.
following this guide:
http://allseeing-i.com/ASIHTTPRequest/Setup-instructions
you need to follow this set of instruction to use this API http://allseeing-i.com/ASIHTTPRequest/Setup-instructions, I am sure you didn't added libz.dylib in your project
Make sure that ALL relevant targets have libz linked. You could be adding it to Target A and trying to compile Target B which is missing it.
Please make sure that you link against libz correctly, eg. check that its included in the "Link Binary With Libraries" build phase of your target.
I'm not a 100% sure, but it says "for architecture i386" ... should be armv6 or armv7...
So i would check your build steps...
In Xcode 8 libz.dylib has been renamed to libz.tbd