I develop an Iphone application on Xcode 4.0. I have to format an HTML file and put it into a Txt view. I'm trying to use TBXML , but i have 6 errors when I debug:
Undefined symbols for architecture i386:
"_deflateInit2_", referenced from:
-[NSData(NSDataAdditions) gzipDeflate] in NSDataAdditions.o
"_deflate", referenced from:
-[NSData(NSDataAdditions) gzipDeflate] in NSDataAdditions.o
"_deflateEnd", referenced from:
-[NSData(NSDataAdditions) gzipDeflate] in NSDataAdditions.o
"_inflateInit2_", referenced from:
-[NSData(NSDataAdditions) gzipInflate] in NSDataAdditions.o
"_inflate", referenced from:
-[NSData(NSDataAdditions) gzipInflate] in NSDataAdditions.o
"_inflateEnd", referenced from:
-[NSData(NSDataAdditions) gzipInflate] in NSDataAdditions.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
Something with gZip library i guess... If somebody know an issue to fix that or an other good/complete XMLParse library, thanks to answer me :D
PS: If you had some difficults to read, i'm sorry for my english...
This type of error means that you haven't included a library or framework.
A quick Google of deflateInit2 tells me it's the libz framework.
If you add libz.dylib to your list of frameworks it should compile.
Hope that helps.
Related
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.
I'm trying to create application that sends email
I used classes like
SKPSMTPMessage , NSStream+SKPSMTPExtensions, NSData+Base64Additions, HSK_CFUtilities, Base64Transcoder
but it gives me the following errors
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_SKPSMTPMessage", referenced from:
objc-class-ref in MFViewController.o
"_kSKPSMTPPartContentTransferEncodingKey", referenced from:
-[MFViewController sendMail:] in MFViewController.o
"_kSKPSMTPPartContentTypeKey", referenced from:
-[MFViewController sendMail:] in MFViewController.o
"_kSKPSMTPPartMessageKey", referenced from:
-[MFViewController sendMail:] in MFViewController.o
"_CFHostCreateWithName", referenced from:
+[NSStream(SKPSMTPExtensions) getStreamsToHostNamed:port:inputStream:outputStream:] in NSStream+SKPSMTPExtensions.o
+[NSStream(SKPSMTPExtensions) getStreamsToHostNamed:port:inputStream:outputStream:] in SKPSMTPMessage.o
"_CFStreamCreatePairWithSocketToCFHost", referenced from:
+[NSStream(SKPSMTPExtensions) getStreamsToHostNamed:port:inputStream:outputStream:] in NSStream+SKPSMTPExtensions.o
+[NSStream(SKPSMTPExtensions) getStreamsToHostNamed:port:inputStream:outputStream:] in SKPSMTPMessage.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
keep in mind that I'm using Xcode 4.3 ,
what shall I do to solve this??
After adding the CFNetwork framework and SystemConfiguration framework ,
the number of errors decreased from 6 to 4 and it is now
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_SKPSMTPMessage", referenced from:
objc-class-ref in MFViewController.o
"_kSKPSMTPPartContentTransferEncodingKey", referenced from:
-[MFViewController sendMail:] in MFViewController.o
"_kSKPSMTPPartContentTypeKey", referenced from:
-[MFViewController sendMail:] in MFViewController.o
"_kSKPSMTPPartMessageKey", referenced from:
-[MFViewController sendMail:] in MFViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This error message means that those classes search some objects in a framework that you haven't linked to your project. Here you can found what framework do you need: the CFNetwork framework.
I hope it helps!
EDIT
The other 4 errors might be caused by the incorrect importation of the SKPSMT classes. If that classes are downloaded as a library, you'll also need to link your app with that library.
Try adding the following linker flags:
OTHER_LDFLAGS = -lz -lxml2 -ltidy -ObjC
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).
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.
Hi i have this problem in xcode..
Undefined symbols for architecture i386:
"_inflateInit_", referenced from:
_decode_frame in libavcodec.a(pngdec.o)
"_inflateEnd", referenced from:
_decode_frame in libavcodec.a(pngdec.o)
"_inflate", referenced from:
_decode_frame in libavcodec.a(pngdec.o)
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
online i haven't found any solution, have any idea? thanks
From the Apple mailnglists:
To use the routines, include zlib.h in your source and libz.dylib into your project.
Or get zlib: zlib.net
Or get the CocoaPod: objective-zip