apple mach-o linker error - string ar - ios

Xcode builds… I'm following http://www.youtube.com/watch?v=mQCjup8Uv5Q to the T and I'm getting errors.
I have the error apple Mach-o Linker Error some how with
'Undefined symbols for architecture armv7 and it references some items from the location: StringLoadImageMarker in libstringUnityDemo-1.1.3.a (StringAppController.o)
StringSetProjectionAndViewport in libStringUnityDemo-1.1.3a (StringAppController.o)
The undefined symbols to the error above are _timer, _cur0rientation, 0orientationwillchangesuraceextents, _surface, unitykeyboardorientation, handle0rientationRequest, Shouldhandlerotation, present surface, unitysetalloworientationdetection
My software versions are
Unity 4.1.3, Xcode 4.6.2, String 1.1.3
I would appreciate your help!
Regards,

well without doing a logmein or seeing any code... hard to tell... often these linker errors happen when you forget to add the library to the project (not just import the files, but actually go in the project settings and make sure it gets imported, just google importing library to project), or sometimes the libraries you use are ok to use on a device but not on the simulator, or vice versa....

Related

"Undefined symbols for architecture arm64" appearing after Unity FB SDK Update

Unity Version: 2020.3.25f1
XCode Version: 13.2.1
Unity FB SDK: Migrating from 11.+ to 14.0.0
After resisting updating the Facebook Unity SDK due to editor/ide related issues introduced in 13.2, was working to update to Unity Facebook SDK version 14.0.0. After resolving the standard issues to be in compliance with FB's updates (including client token in the FB Settings specifically and setting the DLLs to the correct build architecture), I had been able to build webgl and android without issue, but have encountered an iOS build fail.
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_ACAccountStore", referenced from:
objc-class-ref in Util.o
"_ACFacebookAppIdKey", referenced from:
_Util_getNativeFBPermissionStatus in Util.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Reading through the various other issues hitting a similar Undefined symbols for architecture blah makes me think I might either be missing something in my linker settings, or potentially missing a framework I need to reference. Originally I had assumed it was something happening during archiving, but the same error shows when just trying to build the xcode project. The pod file builds successfully and resolves without issue, so the xcode workspace is being built.
EDIT: Adding a little more info, I had already done the dll import settings solution suggested.
This is solved by: https://github.com/facebook/facebook-sdk-for-unity/wiki/FAQ---Troubleshooting-Unity-SDK-14.0.0
Your issue is "Issue 2: dlls misconfiguration"--for completion's sake, below is the solution in its entirety. I'm leaving the misspellings and bad grammar below just to emphasize how sloppy these guys are.
"Solution:
This is an indication of mis-configuration of dlls in Unity. When Unity SDK is imported into Unity, unfortunately Unity reconfigures all dlls to 'All Platforms' and this causes an issue when building on a particular platform. The way to resolve this, is to reconfigure the dlls. You will find them in Unity under FacebookSDK -> Plugins and all the dlls are under their various platform folders such as Android / Canvas / Editor / iOS etc. Click on them and an inspector will appear (attached screenshot). The example attached shows the configuration for an Android dll. Uncheck All Platforms (if needed) and select Android. Do the same for the rest:
Android.DLL to Android platform
IOS Dll to iOS platform
Canavs to webgl"
Edit: As noted additionally below if you aren't building for Windows (or any of the other platforms), just delete those folders. Regardless you will HAVE to delete the Windows x86 folder if you want your build to work on mobile.
After getting some input from an engineer that had worked on this project in the past, managed to find that the missing symbol was related to some old FB Code no longer supported, and it was not in use by our app anymore. Because of this, was able to cleanly remove the old code and resolve the build issue. Things appeared to be working as intended. For visibility, we had an internal class using some extern methods to bridge between our app code and the native code pertaining to platform. iOS had a method getNativeFBPermissionStatus that was part of a Util.m class.

Integrate AppLovin With swift xcode 6.4

I want to integrate AppLovin With Xcode 6.4 and swift. I am Following the steps which are given in Documentation. I have added Headers and libAppLovinSdk.a Library in my project. Then I have added all the frameworks which are needed and added AppLovin SDK key into info.plist file. Then I have initialized ALSdk.initializeSdk() in Appdelegate.h file and I have added Bridging file in my project. Then I wrote -Objc in "Other Linker Flags"
I am getting this error
ld: 150 duplicate symbols for architecture i386 clang: error: linker
command failed with exit code 1 (use -v to see invocation)
EDIT:
This is the error log.
Based on the linker errors (duplicate symbol _llvm.embedded.module) as well as the fact that you're using an older Xcode version, it may likely be a conflict/mismatch between the target/compiler of your project and the dependency. This isn't inherent to AppLovin, but can happen if the static library you're using is far too new or old for your Xcode version.
One possible occurrence of this is that we started compiling the library with Bitcode support, and I wouldn't be surprised if older versions of LLVM don't play nice with that.
I'd recommend pulling the latest version of libAppLovinSdk.a, and if at all possible, building using Xcode 7+.
Additionally, if you're using some dependency manager like Cocoapods or Carthage, you may have better luck directly (manually) integrating, given that they are maintained by third parties with no involvement from us.
You are initializing SDK at wrong place. At the time of didFinishLaunchingWithOptions: call, application has not been fully prepared. Try initializing it in method:
-(void)applicationDidBecomeActive:(UIApplication *)application
Also include -ObjC flag. It should solve duplicate symbols issue.

Xcode - unidentified symbols for architecture archs in libpjmedia-codec-arm-apple-darwin9.a(opencore.o)

I really having a hard time to figure out the problem.
i'm using PJSIP and also opencore-amr.
successfully compiled opencore-amr to arm64 (lipo -info told me)
successfully integrate opencore-amr (arm64) with PJSIP
(arm64),configure it, make dep, make clean and make without any
error.
when i try to compile it with XCode. it says
Undefined symbols for architecture arm64:
"_Decoder_Interface_Decode", referenced from:
_amr_codec_decode in libpjmedia-codec-arm-apple-darwin9.a(opencore_amr.o)
I did ar-t libpjmedia-codec-arm-apple-darwin9.a and the opencore.o inside the library is arm64.
I really have no clue to solve this.
please help me, thanks
FYI : I've tried open core with pjsip for android, and no issue at all.
This is the linker error, you probably forgot to link some library. Go to Project settings -> Build phases -> Link Binary with Libraries section and review it. Try to google which framework contains the classes mentioned in error log and then add it to frameworks list.

Upgrading Google Mobile Ads iOS SDK from 5.0.5 to 6.4.2 results in linker errors

I have an existing iOS app that is using Google Mobile Ads SDK (v 5.0.5, I believe). I need to upgrade it to the latest version for DoubleClick support. However, I'm getting linker errors.
My steps were as follows:
Remove file references for previous SDK from project
Remove previous libGoogleAdMobAds.a linked library
Follow the setup instructions (to the letter, including the required frameworks, including only the specific files, as well as adding the Other Linker Flag)
The specific error is:
Undefined symbols for architecture i386:
"_CGSizeFromGADAdSize", referenced from
or
"_kGADAdSizeBanner", referenced from
What else am I missing?
Maybe you need the -all_load linker flag option too? According to this article it's obsolete for newer ARM7 targets, but perhaps you have an old target?
http://vntin.com/feeds.feedburner.com/blogspot/LTiVe
See under this section: "Support for armv7s"
"If you’re targeting the armv7s architecture, you will not need to add the -all_load linker flag to your projects anymore. "
[Update]
You can try to verify what's in the lib*.a file by using the nm command.
nm -U libGoogleAdMobAds.a | grep kGADAdSizeBanner
Also, clicking on the Log Navigator may provide some additional information. Select the last icon then your last build in the left nav.
[Update 2]
Someone on this site also complained about a linker problem with the new API. Might have to make small changes to your code.
http://www.monkeycoder.co.nz/Community/posts.php?topic=1246
Something has changed in the latest AdMob SDK. I get the same linker error. I can use an older version of the SDK and this all works fine. Anyone know what could have changed with Ad sizes?
EDIT: Found the problem. There were some name changes to constants :)
https://developers.google.com/mobile-ads-sdk/docs/ios/intermediate
Change the GAD_ ad sizes with:
kGADAdSizeBanner.size.width and kGADAdSizeBanner.size.height

How to link an Adobe AIR3 Native Extension for iOS against an iOS framework?

I’m working on an app with an AIR3 iOS native extension that uses Accelerate.framework
Followed the first steps mentioned in the tutorials, successfully created an .ane file etc.
When I run the final packaging command (adt -package -target ipa-test ...), I get the following errors:
ld warning: unexpected srelocation type 9
ld warning: unexpected srelocation type 9
... (repeating several times)
Undefined symbols:
"_vDSP_vsdiv", referenced from: ...
"_vDSP_vsmul", referenced from: ...
... several more like this
ld: symbol(s) not found
Compilation failed while executing : ld64
I guess this is because when I created the .a file in xcode, it couldn’t really link it statically to the Accelerate.framework.
I suppose I need to tell adt to link it somehow? Probably in the phase I’m creating the .ane file? Or maybe I should change my extension.xml file?
No idea. Couldn’t really find it...
Please advise.
UPDATE: This seems like a bug on the Adobe side specifically with Accelerate.framework. I'll keep updating here in case other guys stumble upon this one.
Make sure you are using the latest Flex 4.6 SDK. If that doesn't solve it, ensure you have specified the Apple iOS SDK correctly under the Native Extensions tab of your Apple iOS build packaging in your project settings. It should be
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk
if you installed Xcode into the default folder
I've had this "srelocation" error, because the included libraries (in my case AudioToolBox/ OpenAL) were treated as shared libraries by XCode: They were not included in my library build (even when it's static). I've had to set "Enable Linking With Shared Libraries" under Build Settings to NO, and then the errors have been gone. Maybe this will solve your problem too...

Resources