"_OBJC_CLASS_$_MSClient", referenced from: objc-class-ref in AuthService.o - xcode6

I git clone this ios project form
https://github.com/Azure/azure-mobile-services. That project is an example of using azure mobile service on ios. But when I compile it under XCode6, I get the follwing error:
ld: warning: ignoring file
/Users/JOHN/Src/iOS-MobileServices-Authentication/source/client/AuthenticationDemo/WindowsAzureMobileServices.framework/WindowsAzureMobileServices,
missing required architecture x86_64 in file
/Users/JOHN/Src/iOS-MobileServices-Authentication/source/client/AuthenticationDemo/WindowsAzureMobileServices.framework/WindowsAzureMobileServices
(3 slices) Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_MSClient", referenced from:
objc-class-ref in AuthService.o "_OBJC_CLASS_$_MSUser", referenced from:
objc-class-ref in AuthService.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code
1 (use -v to see invocation)
Does anyone know how to fix this?
Thank you.

In your project, build settings, set your valid architectures to just be "Standard Architecture (armv7, armv7s)" and not "Standard architectures (including 64-bit)"
and also set build active architecture only to No in all cases ie debug and release.
Currently the SDK is built with support for 5.1 which doesn't support a 64 bit build.

Related

Xcode 6.4 Framework

I cannot seem to find the solution to this problem. I created a new custom framework in Objective-C and when I included it in a sample project, I am getting the following messages/errors on compilation:
ld: warning: ignoring file /Users/location/CustomFrameworkAPI.framework/CustomFrameworkAPI, missing required architecture x86_64 in file /Users/location/CustomFrameworkAPI.framework/CustomFrameworkAPI (2 slices)
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_CustomFrameworkAPI", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
When I checked the architecture of the framework, I'm seeing that x86_64 is part of the custom framework that I have built. Can someone tell me what the problem is?
MacBook-Pro:CustomFrameworkAPI.framework user$ file CustomFrameworkAPI
CustomFrameworkAPI: Mach-O universal binary with 2 architectures
CustomFrameworkAPI (for architecture armv7): Mach-O dynamically linked shared library arm
CustomFrameworkAPI (for architecture arm64): Mach-O 64-bit dynamically linked shared library
I believe the error that you posted says that the framework you are using CustomFrameworkAPI referred in ViewController is not built in such a way that it supports 64-bit environment.
Kindly check your framework's architecture on which it is built upon.
Use lipo command to check the architecture of the framework.
This might not be the exact solution or answer to your problem.
Thanks.

GPUImage issues running on simulator

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.

Cocos2d ARC link error for device but builds for the simulator

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.

"_OBJC_CLASS_$_",referenced from:

Hello i am getting the following errors and warnings if i build the program on simulator,but if i run it on the real device these things disappears?why do i get this?any idea?
ld: warning: ignoring file /Users/interaxisnetworks/Desktop/Test/TestProg/audiocall/PortSIPLib.framework/PortSIPLib, missing required architecture x86_64 in file /Users/interaxisnetworks/Desktop/Test/TestProg/audiocall/PortSIPLib.framework/PortSIPLib (3 slices)
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_PortSIPSDK", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Once i run the app on phone,i am not getting these warnings at all.But sometimes when i open the program and do build on simulator i get these errors and warnings.
i have gone through answers for similar problems,added app delegate.m in build settings,still these errors are coming.
The PortSIPLib.framework you tried to link your app with seems to be iOS only. You should ask the provider of the framework for a binary that is suitable for the simulator. If he can't or won't provide one, then there is nothing much you can do, I'm afraid.

AWS IOS SDK 1.7.0 -> Undefined symbols for architecture armv7s:

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.