i am adding a a swiper sdk in my application. when i run its test app it work fine but when i import my file to it .get error
ld: library not found for -lCardAnalyLib1
clang: error: linker command failed with exit code 1 (use -v to see invocation)
i searched for the error but dint get how to resolve. nd some time armv error
(null): Library not found for -lCardAnalyLib1 it is .a typefile
#import <UIKit/UIKit.h>
#import "AudioAnalyLib.h"
#import <QuartzCore/QuartzCore.h
these are pre imported file but if i import any other file get above error
You need to add the .a file to your target. Choose the Build Phases tab of the target in Xcode, open up the Link Binary With Libraries section, and add your library file.
Related
I am working on integration firebase ML vision kit without using the cocoa pods:
I am getting below error when adding SDK frameworks(MLVision and MLVisionTextModel) in app :
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Point 1:
My steps as I followed in app to integrate these SDK's framework :
A. Downloaded firebase SDK 5.20.2.
B. Followed the steps as defined inside the Readme.md file.
First, I added all framework from 'Analytics' directory into project navigator pane and do same thing for Firebase.h file.
Added the -ObjC flag to "Other Linker Settings
In AppDelegate.m , I add #import "Firebase.h" and [FIRApp configure];.
Project build successfully without any error.
C. Getting issue : For text recognition, I added MLVision and MLVisionTextModel in app as defined the step 5 in Readme.md for require framework and resource.
When I build this project I am getting below error in app:
I am getting below error as
Undefined symbols for architecture x86_64:
"std::__1::basic_iostream<char, std::__1::char_traits<char> >::~basic_iostream()", referenced from: l59875 in TextDetector
"typeinfo for std::__1::basic_iostream<char, std::__1::char_traits<char> >", referenced from: l59875 in TextDetector
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Point 2: Getting issue
Sometimes I was trying same thing adding SDK's framework by 'Link Binaries With Libraries' in Build Phases for Analytics, MLVision and MLVisionTextModel.
I was getting below error as
ld: framework not found FirebaseMLVisionTextModel
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Note: The framework FirebaseMLVisionTextModel doesn't have FirebaseMLVisionTextModel.h file. It doesn't exist header folder which is missing in FirebaseMLVisionTextModel framework:
I am getting same issue for TextDetector.framework which doesn't have any header folder.
Firebase.h : Deceleration file in Firebase.h which is missing in framework:
#if __has_include(<FirebaseMLVisionTextModel/FirebaseMLVisionTextModel.h>)
#import <FirebaseMLVisionTextModel/FirebaseMLVisionTextModel.h>
#endif
Xcode version: 10.1
Firebase SDK version: 5.20.2
Firebase Component: ML Kit (text recognition)
Component version:
Pls suggest how do I fix this problem.
How do I use FirebaseMLVisionTextModel and TextDetector framework that doesn't have any header , these frameworks have only exec file?
From https://github.com/firebase/firebase-ios-sdk/issues/2843:
The system C++ libraries are not being linked. That can happen with an incorrect Xcode module cache. Do rm -rf ~/Library/Developer/Xcode/DerivedData to reset. If that doesn't work, add libc++ to the Link Binary With Libraries Build Phase:
I am trying to create archive of my project and everytime i am getting this error:
ld: can't open output file for writing: /Users/ranbeerhora/Documents/KicksendRepo/KickSend/trunk/KicksendiOSSwift /Build/Intermediates/ArchiveIntermediates/KickSend/IntermediateBuildFilesPath/KickSend.build/Release-iphoneos/KickSend.build/Objects-normal/arm64/KickSend, errno=21 for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
i have tried different things but none of the solution works.
I got the answer.I was not giving path of the objective-c bridging header file in the build setting, when i gave the file path it worked.
Explanation:
xcode was not able to open output file for writing because it was not able to access that file since the path was not given when i gave the path xcode found the file and i was able to create the archive.
Every time when I open my app with Xcode I get this error:
ld: library not found for -lGoogleAnalyticsServices
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Then I need to unmark the target on the libGoogleAnalyticsServices.a file and mark it on again. After the uncheck/check of the target the app runs normally...
I get 2 other warning when this happens:
ld: warning: directory not found for option '-L/Users/vision/Documents/Apps/Mijn Cijfers/Mijn'
ld: warning: directory not found for option '-LCijfers'
Now this looks like Xcode can't read spaces and looks for a new directory called Cijfers. My app is called: Mijn Cijfers, but I never had this problem before with spaces in my project name.
Every time when I check/uncheck the target of libGoogleAnalyticsServices.a the Library Search Path is adding new rows:
I think both cases has to do something with the warnings and errors that I get. It's really annoying to remove the Library Search Paths and check/uncheck the target to let my app run normally. -.-
Does anyone know a solution to solve this odd bug?
You need to delete all these path except the "$inherited" and then add Google Analytics library path (Drag the folder where you saved the library).
If you follow this then you don't need to recheck/uncheck the library path.
If you have just created pod file by running $ pod init command in terminal,
then just close project and Open projectName.xcworkspace instead of projectName.xcodeproj
which will not throw error -lxyzLibray eg. -lJSONModel not found.
Now compile and debug again It will work.
I'm trying to integrate MetatoneOSC into a brand new Swift iOS project.
What I've done so far:
Create new iOS Swift Project
Drag folder full of .h and .m files into Xcode project
Create a functioning bridging header (autocomplete now works for methods in the library) - #import "MetatoneOSC/F53OSC.h"
Put the following code in ViewController.swift:
let client = F53OSCClient.init()
The build fails with the following error:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_F53OSCClient", referenced from:
type metadata accessor for __ObjC.F53OSCClient 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)
Each new class I use in my code creates a duplicate error, with a different class name after $_F53OSC in the error message.
I have tried setting up a new Objective-C project to make sure it's not a bridging error, and I get exactly the same error. Anyone know how I can resolve this?
This generally means you forgot to compile the relevant .m file. In you "Build Phases > Compile Sources" step for the target, make sure you've included all the relevant files. This doesn't always happen automatically if you just drag them into the project.
I have added libCommonCrypto.dylib library in my project from Build Phase but still my project display error below,
ld: library not found for -lcommonCrypto
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Here is the screenshot of my Build Phase menu.
I don't think you need that library to include directly, instead you can try
adding Security.framework
#import <Security/Security.h>