I am working on a project with the Swift programming language and I am trying to use some code from some older Objective-c projects. I have created the bridge file and imported the headers that I need but I get the following error, which I know it has to do with linking some framework, but even when I added CoreGraphics as an added framework it still appears. Any ideas?
Undefined symbols for architecture x86_64:
"_CGPointMake", referenced from:
_CGPointAdd in SKActionEffects-669E235BD7235D6A.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Thanks
UPDATE: setting the BaseSDK did not do the trick. This is what my build settings are like with xcode6.
Check if the "Target Membership" of your files are appropriate.
I don't think that adding a class to test target just to test it is a good idea. In my case checking "Allow testing Host Application APIs" made a difference.
Related
I have used pod "SinchRTC" and I am able to build and run the project in debug mode. But now when I am achieving the project, I am getting the error :--
Undefined symbols for architecture arm64:
"___isPlatformVersionAtLeast", referenced from:
-[RTCMTLRenderer setupTexturesForFrame:] in Sinch(libSinch-dist.a-arm64-master.o)
-[RTCMTLVideoView frameRotation] in Sinch(libSinch-dist.a-arm64-master.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Is this a framework issue because I am not getting any solutions?
I want to upload this build. Can you please provide me a solution for this.
Thanks in advance.
Make sure you have arm64 architecture turned on in your project's build settings. Also, if you are trying to use the same binary for both iPhone 5 and 6 (and others), make sure that and that 'Build for Active Architecture Only' is turned off.
Or
Try this
isPlatformVersionAtLeast are in iOS SDK 13, so would require Xcode 11 beta. I think you are getting the error because you are using an earlier Xcode version Xcode 10.3 .
Anyone knows how to solve this error? I can't compile my project with IMFPush library =/
ld: warning: ignoring file /Users/kersul/Develop/Grabit_iOS/Pods/IMFPush/Frameworks/IMFPush.framework/IMFPush,
missing required architecture i386 in file
/Users/kersul/Develop/Grabit_iOS/Pods/IMFPush/Frameworks/IMFPush.framework/IMFPush
(2 slices) Undefined symbols for architecture i386:
"_OBJC_CLASS_$_IMFPushClient", referenced from:
type metadata accessor for __ObjC.IMFPushClient in AppDelegate.o ld: symbol(s) not found for architecture i386 clang:
error: linker command failed with exit code 1 (use -v to see
invocation)
There are a few questions around that seem to tackle this issue.
I would first take a look at Jordan's advice here
and ensure that the framework was added to your project correctly. Additionally ensure that the framework has been linked correctly
If neither fixes the issue then also see the answer posed by Allen and check to see if your .m file is listed under your compile sources.
That said, i386 architecture is what is used by the iOS Simulator. Do be aware that the Simulator cannot replicate push functionality, so even if you are able to compile IMFPush for it, it will not function correctly.
I want to add RevMob add in my app but there are some errors
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_SKStoreProductViewController", referenced from:
objc-class-ref in RevMobAds(RevMobStoreController.o)
"_SKStoreProductParameterITunesItemIdentifier", referenced from:
-[RevMobStoreController openStoreWithITunesItemId:] in RevMobAds(RevMobStoreController.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have added StoreKit,SystemConfiguration and RevMob Frameworks already.
I am using Xcode4.3 and ios4.2
Plz help me.
Thanks in advance.
You need to add the StoreKit framework
EDIT: I see now what you mean, there was an issue with the older versions, I'm adding a link to an edited framework to solve that issue: Edited Revmob Framework
You must link against StoreKit.framework
It looks like the ad sdk you have now does not include support for use with the simulator.
-[RevMobStoreController openStoreWithITunesItemId:] in RevMobAds(RevMobStoreController.o)
ld: symbol(s) not found for architecture i386
if you get anything that mentions "not found for architecture" means revmob didnt include classes for running on simulator. You have 2 choices. look for a missing library ".a file" or only compile for testing on a device.
I've ran into an issue with the new ios6 where revmob did not support the new iphone 5 armv7s architecture.
Double check your revmob installation or try compiling to your phone instead of the simulator
When your are dropping the files manually in xcode the files are not copied to Bundle. So "SKStoreProductViewController.m" was the file not copied in the bundle so the error occurred. To resolve the error. Drag the files only .m files to Copy Bundle Resourceas shown in the image
This error can also happen if you removed a file from your project and subsequently re-created it. Sometimes Xcode doesn't automatically re-include it in the 'compile sources' box (when you click on target).
Check the box and see if all of your source files are included, if not then drag them in and rebuild.
They release a new SDK version (4.6.0) that works perfectly on older Xcode versions!
This also happens with Appirater. I was getting this message:
Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_SKStoreProductViewController", referenced from: objc-class-ref in Appirater.o "_SKStoreProductParameterITunesItemIdentifier", referenced from: +[Appirater rateApp] in Appirater.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
---To Fix---
add StoreKit.framwork in --> BuildPhases
---Under-> Link Libraries with Libraries
If you have more than one target you might need to add the
StoreKit.framwork to both Targets.
I faced similar issue and after long search and checking sample RevMob code, i found this solution, may be help others:
Under project target, select Build Settings, under Deployment, check iOS Deployment Target, change the value to 'iOS 9.0' or higher.
I hope this help.
I've downloaded the newest version of googles admob sdk. But now I keep getting the following error when compiling in xcode 4.5 with the latest sdk.
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_ASIdentifierManager", referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADIdentifierUtilities.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any idea on what could be wrong?
You probably didn't add AdSupport.framework. Also remember to remove -all_load linker flag.
AdSupport.framework need in xcode 4.5 and admob 6.x
On the other way you can fix it without adding extra framework, remove the "-Obj" flag from "Linking > Other Linker Flags" if this flag is not required for your project.
I my case it was different, I had supported the GoogleConvertionTracking.lib but after couple of release customer decided to remove the GoogleConvertionTracking.lib from client. After removing all required code from client I started getting this error of ""_OBJC_CLASS_$_ASIdentifierManager", referenced from:"
After going thru the support doc of GoogleConvertionTracking I found that I had added "-Obj" compiler flag under Under Linking > Other Linker Flags.
* by removing this "-Obj" flag from "Linking > Other Linker Flags" for both rel/deb this error is gone.
I don't have to add AddSupport.framework to get rid of this error.
This change may be helpful for those who don't want to add extra framework to avoid the compilation error.
I need to incorporate QR in my app, im using zxing,
the scan test works wonderfully, and when importing the widget after following all instructions, all goes fine,
but
I have this errors when implementing the code for the widget and QRCodeReader
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_ZXingWidgetController", referenced from:
objc-class-ref in AttendanceVC.o
"_OBJC_CLASS_$_QRCodeReader", referenced from:
objc-class-ref in AttendanceVC.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
so how to fix this please?
edit:
my Architectures on build settings is: i386 armv6 armv7
thanks a lot!
Double check step 2 in the README. Under Link Binary with Libraries you must have libZXingWidget.a and it sounds like you don't.
Check the Valid Architectures in the build settings. Check out these links.
Undefined symbols for architecture i386: _OBJC_CLASS_$_SKPSMTPMessage", referenced from: error
Undefined symbols for architecture i386
EDIT : Usually these type of linker errors occur due to the link issue in your compiler or link issue with your added frameworks or your libraries. check whether you are using a suitable compiler, check whether you have added all the required libraries and frameworks. Also check whether you have imported all the libraries and frameworks properly. Please check all these things too once. For guidance on this check the below links
http://forums.macrumors.com/showthread.php?t=956090
Apple Mach-O Linker Error when compiling for device
Linker error (only simulator) with own library after update to iPhone SDK 4.0
clang: error: linker command failed with exit code 1
Hope This Helps..
I had the same issue and following configuration in "Build Settings" works for me.
C Language Dialect: GNU99 [-std=gnu99]
C++ Language Dialect: Compiler Default
C++ Standard Library: Compiler Default