I try to use MailCore in my project, but I get these error:
Undefined symbols for architecture armv7:
"_MailCoreEnableLogging", referenced from:
-[ImapSync run] in ImapSync.o
"_OBJC_CLASS_$_CTCoreMessage", referenced from:
l_OBJC_$_CATEGORY_CTCoreMessage_$_CTCoreMessageBuisnessMail in CTCoreMessage+BuisnessMail.o
"_OBJC_IVAR_$_CTCoreMessage.myFields", referenced from:
-[CTCoreMessage(CTCoreMessageBuisnessMail) libetpanDateTime] in CTCoreMessage+BuisnessMail.o
-[CTCoreMessage(CTCoreMessageBuisnessMail) senderDate] in CTCoreMessage+BuisnessMail.o
"_OBJC_CLASS_$_CTCoreAccount", referenced from:
objc-class-ref in AttachmentDownloader.o
objc-class-ref in ImapSync.o
"_MailCoreDisableLogging", referenced from:
-[ImapSync run] in ImapSync.o
"_IfTrue_RaiseException", referenced from:
-[ImapFolderWorker fetchFrom:to:seqDelta:syncingNew:progressOffset:progressTotal:alreadySynced:] in ImapFolderWorker.o
ld: symbol(s) not found for architecture armv7
but all of these methodes are there, I can see them in the MailCoreProject!
I hope someone can help me!
First, I would check if you have added libMailCore-ios.a to your list of "Linked Frameworks and Libraries".
If so, then the problem could be that the MailCore project was compiled for one device while your main project was compiled for a different device. For instance,
the MailCore project was compiled for simulator ... the symbols of MailCore were generated for x86 architecture
your main project was compiled for real iOS device ... so the linker was looking for MailCore symbols for armv7 architecture
Thus, the linker complained, symbols for armv7 architecture not found
To solve the problem, rebuild the MailCore subproject (build-clean and build) with the same device (or same simulator) as your main project.
These could be number of things. How You added MailCore to Your project? As a static library?
You are missing compiled files for armv7 architecture. Make sure that it's added in "build settings" in MailCore project and then try to build it.
You probably build MailCore for the simulator and now You are trying to run it on device. These have to be separated.
Also, You have to be sure that all libraries which MailCore is using, such as libetpan are compiled properly.
PS: adding MailCore to Your project isn't simple process, but it's worth it. :)
Related
So I've been trying to get GPUImage library to work in a project, and whilst it works on the device, does not work on simulator. I've tried in Xcode 5, using both Retina and non-retina simulators and get the following error:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_GPUImageBuffer", referenced from:
objc-class-ref in StartViewController.o
"_OBJC_CLASS_$_GPUImageVideoCamera", referenced from:
objc-class-ref in StartViewController.o
"_OBJC_CLASS_$_GPUImageView", referenced from:
objc-class-ref in StartViewController.o
"_OBJC_CLASS_$_GPUImageiOSBlurFilter", referenced from:
objc-class-ref in StartViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
My Build Settings are as follows;
I need for this to run on simulator as well as on device. I have tried making Build Active Architecture Only NO, as well as playing around with Valid Architectures, to have armv7 by itself, armv7 and armv7s, and just armv64, but to no avail.
Any help would be amazing.
Thanks in advance
Build Phases -> Link Binary With Libraries ...then add "GPUImage.framework", "libGPUImage.a"
I just deleted "arm64" from "Valid Architectures" and it works for me now. Maybe it helps.
Hi am following this tutorial to enable ARC for my cocos2d project
http://www.learn-cocos2d.com/2012/04/enabling-arc-cocos2d-project-howto-stepbystep-tutorialguide/
The basic idea is to use cocos2d as a static library and disable the arc. It works on the simulator but crashes on my iPhone 5s
"_OBJC_CLASS_$_CCScaleTo", referenced from:
objc-class-ref in Helper.o
"_OBJC_CLASS_$_CCTexture2D", referenced from:
objc-class-ref in AppDelegate.o
"_ccGLBlendFunc", referenced from:
-[SlidingMenuGrid visit] in SlidingMenuGrid.o
"_OBJC_CLASS_$_CCLayer", referenced from:
_OBJC_CLASS_$_SlidingMenuGrid in SlidingMenuGrid.o
_OBJC_CLASS_$_GameScene in GameScene.o
_OBJC_CLASS_$_LevelScene in LevelScene.o
_OBJC_CLASS_$_Mask in Mask.o
_OBJC_CLASS_$_MainScene in MainScene.o
_OBJC_CLASS_$_ResultScene in ResultScene.o
_OBJC_CLASS_$_PackScene in PackScene.o
...
"_ccDrawPoints", referenced from:
-[SlidingMenuGrid visit] in SlidingMenuGrid.o
"_ccDrawPoint", referenced from:
-[SlidingMenuGrid visit] in SlidingMenuGrid.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I use armv7 and armv7s for both the cocos2d library and the game target.
Assuming you have the latest version of Xcode where these options exist:
For both of your projects go into the Build Settings for each target and select "Standard Architectures (armv7, armv7s)" option in the Architectures field. Also have "Latest iOS (iOS 7.0)" selected for Base SDK. For the Valid Architectures field have at least "arm64, armv7, and armv7s".
This should fix your issue with the armv7 missing if you've had something different. Most likely your game/application project has something different if you initially created the project a while back with an older version of Xcode.
I have XCode library I wrote which I use inside Unity3D application.
The library works and now I need to make a change in the implementation, not the interface.
The problem is that in the XCode project created from Unity3D, when I use my library .a file I get this error (I've remove the specific class names).
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_ABNUnityativeController", referenced from:
_OBJC_CLASS_$_ABUnityNativeController in libABSDK_Unity_NativeController_iOS.a(ABUnityNativeController.o)
"_OBJC_METACLASS_$_ABNativeController", referenced from:
_OBJC_METACLASS_$_ABUnityNativeController in libABSDK_Unity_NativeController_iOS.a(ABUnityNativeController.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I'm pretty sure the problem is how I compile my library.
I find that my project settings were bad.
When I choose the main project (I also have sub XCode project in it) inside Build Phases -> Link Binary With Libraries I had to add my sub-project which was listed under Workspace directory.
I'm trying to use the amazon AWS for iOS SDK but I keep getting several Apple Mach-O Linker errors in Xcode 5.0.1
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_S3CreateBucketRequest", referenced from:
objc-class-ref in CreationViewController.o
"_OBJC_CLASS_$_S3Region", referenced from:
objc-class-ref in CreationViewController.o
"_OBJC_CLASS_$_AmazonEndpoints", referenced from:
objc-class-ref in CreationViewController.o
"_OBJC_CLASS_$_AmazonS3Client", referenced from:
objc-class-ref in CreationViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I went into the build phases and made sure the AWSES.framework is included in link binary with libraries. In the compile sources CreationViewController.m is also included.
Target Memberships also seem to be correct. What else can I do?
I had the same problem. My solution was to delete the AWSRuntime.framework and the AWSS3.framework from the project. I then went back to the Amazon site to re-download the aws-ios-sdk-1.6.1. Using the Build Phase -> Link Binary Libraries (+) button I added the fresh frameworks back to the Xcode project and it ran with no problems. I had moved the project from Dropbox to a loaner and back again via Dropbox after my hard drive died. My guess is that this corrupted the files or Amazon has something in the code that frowns on copping the it from one place to another rather than getting it straight from them.
Please help me from the below error.
I am working on graphs using 3rd party framework (libIPhonecharting), every thing works fine in simulator, but when I am trying to build .app file to install in IPAD Device I get the below error message.
ignoring file
/Users/xyz/Desktop/xyzIPAD/library/4.0/Release-iphoneos/libIPhoneCharting.a,
file was built for archive which is not the architecture being linked
(armv6)
Undefined symbols for architecture armv6: "_OBJC_CLASS_$_DTCStroke",
referenced from:
objc-class-ref in DemoLineChart.o "_OBJC_CLASS_$_IPCBar3DChart", referenced from:
objc-class-ref in DemoBar3DChart.o "_OBJC_CLASS_$_IPCLineChart", referenced from:
objc-class-ref in DemoLineChart.o "_OBJC_CLASS_$_DTCDefaultCategoryDataset", referenced from:
objc-class-ref in DemoBar3DChart.o
objc-class-ref in DemoLineChart.o "_DTC_STROKE_CAP_SQUARE", referenced from:
+[DemoLineChart(Private) getRenderWithRender:] in DemoLineChart.o "_OBJC_CLASS_$_IPCTitle", referenced from:
objc-class-ref in DemoBar3DChart.o
objc-class-ref in DemoLineChart.o "_DTC_STROKE_JOIN_BEVEL", referenced from:
+[DemoLineChart(Private) getRenderWithRender:] in DemoLineChart.o ld: symbol(s) not found for architecture armv6
collect2: ld returned 1 exit status
Here's how I got this problem:
I added a .h, .m and NIB from another project by dragging them onto my project navigator. Xcode didn't add them to the Build Phases properly.
My solution for this problem:
Go to the Target in the navigator menu
Click on the "Build Phases" tab
Add the .m file to "Compile Sources" (either drag it across, or use the + button)
Add the .xib to "Copy bundle resources"
Clean and build
It works for me thanks a lot to you
Few questions: Does you external lb have it's own project file? If so make sure that it is configured to build to arm6 and arm7 properly. Do the same for your main project file for good measure. Also, what version of XCOde are you on? There are significant differences between different versions.
Look at the libs scheme (depending on the version of XCode you are using) and make sure that is configured properly for debugging on the iOS device; I assuem you are building to your own device for debugging purposes: this recommendation is because of : "file was built for archive which is not the architecture being linked (armv6)"
After trying each of these things be sure to clean the entire project before each build.
Hope this helps. I feel your pain XCOde is evil.
I solved this issue by adding absent framework to target->Build Phases->Link Binary With Libraries