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.
Related
I have included restkit in project and when i build restkit, it builds successful. But when I build project, it gives 6 errors:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_TTModel", referenced from:
_OBJC_CLASS_$_RKObjectLoaderTTModel in libRestKitThree20.a(RKObjectLoaderTTModel.o)
"_OBJC_CLASS_$_TTTableLinkedItem", referenced from:
_OBJC_CLASS_$_RKMappableObjectTableItem in libRestKitThree20.a(RKMappableObjectTableItem.o)
"_OBJC_CLASS_$_TTTableViewDataSource", referenced from:
_OBJC_CLASS_$_RKObjectTTTableViewDataSource in libRestKitThree20.a(RKObjectTTTableViewDataSource.o)
"_OBJC_METACLASS_$_TTModel", referenced from:
_OBJC_METACLASS_$_RKObjectLoaderTTModel in libRestKitThree20.a(RKObjectLoaderTTModel.o)
"_OBJC_METACLASS_$_TTTableLinkedItem", referenced from:
_OBJC_METACLASS_$_RKMappableObjectTableItem in libRestKitThree20.a(RKMappableObjectTableItem.o)
"_OBJC_METACLASS_$_TTTableViewDataSource", referenced from:
_OBJC_METACLASS_$_RKObjectTTTableViewDataSource in libRestKitThree20.a(RKObjectTTTableViewDataSource.o)
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
kindly help how to rid it off
Make sure your project is using the Three20 library. Also make sure your build order makes sense - you may need to reference three20 in your workspace/project before RestKit is compiled or in the RestKit project if you have one.
I am trying to use EGOTableViewPullRefresh in my ios6 project but I can't get past a linking issue when building. After including the source to my project, adding -fno-objc-arc flag to the EGORefreshTableHeaderView.m and then making all of the necessary changes to the source so that I can build with ARC (removing 'release' etc) I am running into the following linking issues:
Undefined symbols for architecture i386:
"_CATransform3DIdentity", referenced from:
-[EGORefreshTableHeaderView setState:] in EGORefreshTableHeaderView.o
"_CATransform3DMakeRotation", referenced from:
-[EGORefreshTableHeaderView setState:] in EGORefreshTableHeaderView.o
"_OBJC_CLASS_$_CALayer", referenced from:
objc-class-ref in EGORefreshTableHeaderView.o
"_OBJC_CLASS_$_CATransaction", referenced from:
objc-class-ref in EGORefreshTableHeaderView.o
"_kCAGravityResizeAspect", referenced from:
-[EGORefreshTableHeaderView initWithFrame:arrowImageName:textColor:] in EGORefreshTableHeaderView.o
"_kCATransactionDisableActions", referenced from:
-[EGORefreshTableHeaderView setState:] in EGORefreshTableHeaderView.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Has anyone run into this problem using EGOTableViewPullRefresh?
Thanks!
You do need the QuartzCore library framework to be included for pull-to-refresh to link properly.
This is achieved by going to your Target page (click your target icon on the left column at the top of Xcode layout), select the "Build Phases" tab, click to open "Link Binary with Libraries" then click the '+' button, begin to type "QuartzCore" and select the QuartzCore framework.
That should fix these link errors for you.
Make sure you have the QuartzCore framework added.
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.
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.
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).