Help me out With Error _deflateInit2_ - iphone

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

Related

error on AdMob integration

I Have added Addmob sdk in my project and even added all framework needed. But m getting below error for StoreKit framework even i have added it in my project but still getting error..
ld: warning: directory not found for option '- L/Users/company/Downloads/projectname/GoogleAdMobAdsSdkiOS-6.4.2/Add- ons/GoogleAnalyticsiOS_2.0beta4/Library'
ld: warning: directory not found for option '-L/Users/company/Downloads/projectname/GoogleAdMobAdsSdkiOS-6.4.2'
ld: warning: ignoring file /Users/company/Downloads/StoreKit.framework/StoreKit, missing required architecture i386 in file /Users/company/Downloads/StoreKit.framework/StoreKit (2 slices)
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_SKStoreProductViewController", referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADOpener.o)
"_SKStoreProductParameterITunesItemIdentifier", referenced from:
-[GADOpener openInAppStore:fallbackURLString:] in libGoogleAdMobAds.a(GADOpener.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I search a lot but in every post its sid to add Storkit.. but i have already added it but still getting error. even i have cleaned the project a lot of time.
Just ensure that you have added the following libraries,
1.AudioToolbox
2.MessageUI
3.SystemConfiguration
4.CoreGraphics
Also the frameworks,
1.MessageUI.framework
2.StoreKit.framework
3.SystemConfiguration.framework
According to your error message there is a problem with StoreKit.framework...Please verify that...
Refer: build error when add Admob in iOS app
Add AdSupport.framework, also make it as optional
It says that your StoreKit binary is not build for i386. This should not happen with the default one. Did you download if separately from somewhere? You can find the default here:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer‌​/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/StoreKit.framework
Use that.

Upgrade from Facebook iOS SDK 3.2.1 to 3.5 gave me an error with FBCrypto

After installing the new sdk I cleaned the project and build it. It fails with this message:
Undefined symbols for architecture i386:
"_SecRandomCopyBytes", referenced from:
+[FBCrypto randomBytes:] in FacebookSDK(FBCrypto.o)
-[FBCrypto encrypt:additionalDataToSign:] in FacebookSDK(FBCrypto.o)
"_kSecRandomDefault", referenced from:
+[FBCrypto randomBytes:] in FacebookSDK(FBCrypto.o)
-[FBCrypto encrypt:additionalDataToSign:] in FacebookSDK(FBCrypto.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Same problem anyone? Solutions?
Well, you need to include the security framework and the libsqlite3.dylib as stated here.
It works now.
edit
Also found this now...
Jumping on this, im running into the same issue, I saw that the FBSDK needs the Security, AdSupport, etc. Here's my linked libraries:
My error is the same:
Undefined symbols for architecture i386:
"_SecRandomCopyBytes", referenced from:
+[FBCrypto randomBytes:] in FacebookSDK(FBCrypto.o)
-[FBCrypto encrypt:additionalDataToSign:] in FacebookSDK(FBCrypto.o)
"_kSecRandomDefault", referenced from:
+[FBCrypto randomBytes:] in FacebookSDK(FBCrypto.o)
-[FBCrypto encrypt:additionalDataToSign:] in FacebookSDK(FBCrypto.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
All the other framework dependencies are good to go as far as I can tell. A Vlean->Build didn't fix it either. Thanks.
Edit: Got it. I needed to re Add Files to Project and check the Add to Target button.. basically XCode automagicka

iPhone openssl not compiling

I am trying to compile the sample iphone openssl created by x2on here:
https://github.com/x2on/OpenSSL-for-iPhone
I get the following errors when trying to compile in Xcode 4.3.3:
Undefined symbols for architecture i386:
"_MD5", referenced from:
-[ViewController calculateMD5:] in ViewController.o
"_SHA256_Init", referenced from:
-[ViewController calculateSHA256:] in ViewController.o
"_SHA256_Update", referenced from:
-[ViewController calculateSHA256:] in ViewController.o
"_SHA256_Final", referenced from:
-[ViewController calculateSHA256:] in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've been trying to troubleshoot this for a day or so and I am stumped on what to do.
I can provide more information if needed.
According to this site, it indicates that you need to link with libcrypto.
I just figured out why it wasn't working. I never included the shared libraries in the same folder as my project and never linked the header search paths. After cleaning up my project and rebuilding it recognized the Openssl library and it compiled.

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.

AQGridView not linking

I am trying to use the AQGridView in an app. I copied all the files into my project but I keep getting the error:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_AQGridView", referenced from:
objc-class-ref in GridViewController.o
"_OBJC_CLASS_$_AQGridViewCell", referenced from:
_OBJC_CLASS_$_GridViewCell in GridViewCell.o
"_OBJC_METACLASS_$_AQGridViewCell", referenced from:
_OBJC_METACLASS_$_GridViewCell in GridViewCell.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What am I doing wrong? I have all the necessary files added
Remove all the AQGridView files from your project and then add them again, but make sure when adding the Add to targets checkbox before your build target is checked. It seems that the files are added correctly, but not properly linked to your target.