What is causing: Invalid input. ld: library not found for -lclang_rt.ios - air

I'm trying to publish an .ipa file using Adobe AIR via Animate and have started getting this error:
Invalid input.
ld: library not found for -lclang_rt.ios
Would anyone have an idea what this might be related to?
Thanks

To update the SDK you will need to copy the library libclang_rt.ios.a into your AIR SDK and place it at: [AIR_SDK]/lib/aot/lib
You can grab the library file here: https://www.dropbox.com/s/kvhk8yxxomy3tpn/libclang_rt.ios.a?dl=0
Or from your Xcode installation:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/*/lib/darwin/libclang_rt.ios.a
If you don’t do this correctly, you will see something like the following error when packaging:
ld: library not found for -lclang_rt.ios
Compilation failed while executing : ld64

Related

Undefined symbol: _OBJC_CLASS_$_FIRApp

I m trying to add Firebase Analytic and Firebase Crashlytics using Swift package manager here is a link of git for firebase SDK
https://github.com/firebase/firebase-ios-sdk
after that I add this two line in my AppDelegate file
#import <FirebaseCore/FIRApp.h>
#import <Firebase.h>
All fine until when I add this [FIRApp configure]; getting error
Undefined symbols for architecture arm64:
"OBJC_CLASS$_FIRApp", referenced from:
objc-class-ref in HWOFAppDelegate.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I go thought every link of stack-overflow for similar problem try every solution but nothing help me like change Other Linker Flag etc...
Please help me..I really appreciate...I m using Xcode 12.1 with Objective-C
here is a screenshot of error which i m getting
And screenshot of added dependency
After so much searched I solved issue. Solution is
"$(inherited)" In Other Linker Flags
Build Active Architecture Only value to "Yes"
Add Run Script for firebase SPM is "${BUILD_DIR%Build/*}SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run"
Clean project
Build Project
I got the same issue while integrating MLKit in my recent work. The app was running fine on simulator as well as device but when I tried to archive the build it started throwing me error below-:
Undefined symbol: _OBJC_CLASS_$_MLKFaceDetector
I am using the MLKFaceDetector object in my files.
Resolution:-
Go to Build Settings -> Architectures -> Replace standard architectures with arm64. Also, make sure there is no space between arm & 64.
Reason what I understood is MLKit only supports 64 bit not 32 bit and since we are using standard architectures targeting both 32 and 64 bit, so Xcode while archiving for 32 bit is unable to find MLKit files. So we are explicitly saying Xcode to Archive only for 64 bit and not 32 bit.
Cons - It will not support some of the older iOS devices.
Finally I found the solution for this
For me changing ios deployment target to higher version than before workd.Mine was 9.0 I changed it to 13 .
Target-general- deployment info
Can try this it Will help,
Change Linking -> Mach-O Type to Dynamic Library, for the frameworks you used, then it works fine.

Xcode 6 : Linker error with Google Analytics

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

Xcode linker issue

Everything was fine. I just deleted the old TestFlight folder from my Xcode project, and then dragged the new TestFlight SDK 3.0 into my project, and tried to build and got these errors.
ld: warning: directory not found for option
'-L"/Desktop/Work/Games/ClanKingdom/Game/src/Classes/TestFlightSDK1.2.4"'
ld: warning: directory not found for option
'-L"/Desktop/Work/Games/ClanKingdom/Game/src/Classes/Flurry"' ld:
warning: directory not found for option
'-L"/Desktop/Work/Games/ClanKingdom/Game/src/TestFlightSDK2.0.0"' ld:
warning: directory not found for option
'-L"/Desktop/Work/Games/ClanKingdom/Game/src/Flurry"' ld: warning:
directory not found for option
'-F"/Desktop/Work/Games/ClanKingdom/Game/src/FacebookSDK"' ld: library
not found for -lFlurry_4.2.3 clang: error: linker command failed with
exit code 1 (use -v to see invocation)
Why would it be giving me some issue for Flurry? I've not changed anything for Flurry, also I'm not sure why it's trying to link those older versions of TestFlight as I've deleted them.
Any ideas?
I know you've resolved this issue already, but for completeness you were linking your libraries using absolute file paths to a location where they no longer existed.
It looks like you were linking to the TestFlight library on your desktop. This is a really bad idea, you should either keep all your libraries in one sensible location, or keep copies of them locally in the source code of your project. That way you can modify your 'Library Search Paths' to a relative link, e.g.
$(SRCROOT)/Code\ Folder/Third\ Party\ Classes/Google\ Analytics
So $(SRCROOT) will point to the directory in which your xcode project lives, and you can manually enter the path to your library from there. The advantage being you will be able to move your libraries around with your codebase, but also in this instance simply replace the files within the folder at the path you've chosen, and everything should magically work!

Apple Mach-O Linker Error lxml

I just upgraded xcode to 4.5 and now i get an error when compiling :
ld: library not found for -lxml2.2.7.3
cland: error: linker command failed with exit code 1
I did not change my code after the upgrade...
So?
thanks!
Click on your projekt ☞ target ☞ build phases ☞ link binary with libraries
then remove lxml2.2.7.3.dylib and add lxml2.dylib (if your project does not depend on a specific version of that library).
For my ionic project, I found that opening the .xcworkspace instead of .xcodeproj fixed this issue

Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++-4.2 failed with exit code 1

My XCode version is 4.2 for iOS 5.0. I choose "LLVM GCC 4.2" as the compiler. When I compile my project, it show me the following error:
ld: warning: directory not found for option '-L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/gcc/arm-apple-darwin10/4.0.1'
ld: warning: directory not found for option '-L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/gcc/arm-apple-darwin10/4.2.1'
ld: library not found for -lz.1.2.3
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++-4.2 failed with exit code 1
Please help me figure out why this is happening and how to fix it.
The libz.1.2.3 library does not exist anymore (or at least is not included in the SDK). In your project settings, link with a newer version of the library like libz.1.2.5.