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.
Related
I have created a swift framework which contains Obj C classes, and I am trying to use it in my demo app (written in obj c) using development Pods (local cocoa pods), I could able to import the Headers, and I could able to call the methods which are in the framework, but I am getting the following error while compiling the demo app
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_ClassName", 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)
How do I resolve this? any suggestion would be appeciated
Updates: Define Module is set to YES in framework's build settings, Under Packaging
I'm currently getting this error
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_ASIdentifierManager", referenced from:
objc-class-ref in libAdIdAccess.a(TAGActualAdIdAccess.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Added Frameworks:
AdSupport
CFNetwork
libsqlite3.0.dylib
libz.dylib
libAdIdAccess.a
libGoogleAnalticsServices.a
Tried evertyhing, also added -lAdIdAccess and -lGoogleAnalytics to other linker flag.
It happens with version 3.10 of the SDK.
Hope you can give me some advices to resolve this issue.
For implementing Google analytics you also have to import these two frameworks.
SystemConfiguration.framework
CoreData.framework
With libsqlite3.0.dylib,libz.dylib,libGoogleAnalticsServices.a
A great tutorial on Google analytics
Thanks.
Check if your target is linked with libGoogleConversionTracking.a. This may be a related library. I linked to this library to resolve this exact error.
This answer arrives some years later but I just came across the same error as you.
I tried adding AdSupport.framework in the xcodeproj file for the target I am building under "Build Phases" -> "Link Binary With Libraries". Adding that framework solved the error.
Source:
https://firebase.google.com/support/guides/analytics-adsupport
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.
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.
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.