ld: framework not found GoogleMapsCore clang: error: linker command failed with exit code 1 (use -v to see invocation) - objective-c

I don't know why I have this error("linker command failed with exit code 1 (use -v to see invocation)") on my IOS app.

This may happen because any of the following reasons.
if you do not import the framework properly.
if you are opening the .xcodeproj instead of .xcworkspace
Check the build settings -> Build Active Architectures only is set to No. (Then change it to YES)
Adding the other linker flags in Project and not in Targets. So, you move it to Targets, it shouldn't be in Project

I had a similar problem, and the problem was that mine Framework folder is not inside the project folder.
Build Settings > Framework Search Paths > enter these 2 lines in the window
$(PROJECT_DIR)/../<YOUR_FOLDER_WITH_FRAMEWORKS>
$(inherited)

Related

Apple Mach-O Linker (ld) Error - Importing Frameworks

These frameworks work within another project but when creating a new project, it errors. The new project is blank and it fails because I import the frameworks. I am clicking and dragging the frameworks into Xcode.
Xcode 8.3.2 & Xcode 7.3.1
Apple Mach-O Linker (ld) Error Group
clang: error: linker command failed with exit code 1 (use -v to see invocation)
These are my frameworks:
Screenshot 3
I have tried:
Recreating the project
Readding the frameworks
Set Build Settings -> Framework Search Paths -> $(PROJECT_DIR) to recursive
Checked frameworks added to Build Settings -> Link Binary With Libraries
Clean & Clean Build Folder

ld: library not found for -lopencv_imgproc error

While building my project, I am getting this error.
ld: library not found for -lopencv_imgproc
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What kind of library it is.? Can somebody explain.
Hello friend there are a lot of reason of linkers error. Some basic reason:
1. You can remove linker error goto Build Setting>Build Active Architecture Only set to No for Target and Project both.
2. Sometimes unnecessary .a files created Target>General. Delete irrelevant .a files.
3. Delete all library paths from Build Setting>Search Paths(o top) which you are not using like AFNetworking then pls delete -lAFNetworking path.
Try this if still you got the error show me the screenshot.
Thanks

linker command failed error in case of Twitter+Oauth libraries

i am integrating twitter iOS app with my iOS app just for login purpose and for that i am using SCTwitter and Twitter+OAuth frameworks. but the problem is that when i build my project it gave me a compiler error like below:-
**ld: warning: directory not found for option '-L/Users/harvinder/Desktop/iphone_app 13/Twitter+OAuth/Libraries'
ld: warning: directory not found for option '-L&'
ld: warning: directory not found for option '-LHeaders'
ld: library not found for -lOAuth
clang: error: linker command failed with exit code 1 (use -v to see invocation)**
the above error clearly stated that the Twitter+OAuth library is not found but i have recheck my project and it is added and also i have tried many things like
1. library search paths($(PROJECT_DIR)/Twitter+OAuth/Libraries & Headers)
2.also check Link Binary And Libraries under build phases for libxml2.dylib and libOAuth.a
At last i delete the Twitter+OAuth folder and readded it and then everything works fine but the wired thing is that on the next day when i reopen my project in Xcode ,the same error encounter again and again i delete and readded the Twitter+OAuth folder and everything works fine again and same thing happens on the next day too. so i don't understand this weird behavior.
so please help me on this because everyday i have to delete and readd the folder to run my project.
Spaces are used to separate command line options and the directory with the library contains spaces, so you will need to ensure the command line interpreter doesn't see those spaces. That is generally done using quotes, so try this value in the Library Search Paths:
'$(PROJECT_DIR)/Twitter+OAuth/Libraries & Headers'
^ ^
Alternatively avoid using spaces in directory names.

"ld: library not found for -lPods" only when run in real device

I entered the mysterious phenomenon that I can build my app for simulator but I can't build for real device. The error is as below (which doesn't appear when build for simulator):
ld: library not found for -lPods-TechMoviePlus
clang: error: linker command failed with exit code 1 (use -v to see invocation)
(I'm using Cocoapods and attach one of my app's targets, so that the name of library is a little different.)
Project > Target > General > Linked Frameworks and Libraries is as below:
Thank you for your kindness!
Assigning the target in Podfile has resolved the problem.
target :TechMoviePlus do
pod "AFNetworking", "~> 2.0"
pod "LBGIFImage"
end
Open your pbxproj file with an editor and check for references to Pods-Application. If you renamed your application after pod install, you may have some references to the old pods.
Remove all the references to Pods-Application, launch xcode, full clean, and build.
It worked for me.

XCode 4, ParseKit and Archive Target

I'm trying to archive an iPad application that used ParseKit. I'm able to run the app fine, utilizing ParseKit, for any build using the Debug Configuration (ie, Run on device / simulator ana analyze.) When I use the Release Configuration, however, I get the following linker error:
ld: library not found for -lparsekit
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1
I had the same error. The fix for me was to select:
ParseKit.xcodeproj (subproject within my project)
-> Target: ParseKitMobile
-> Build Settings
-> Product Name
...and change the name from 'parsekit' to 'libparsekit'. Curious that this is necessary for XCode4, but it's now working for me at least.
Check your flags in your release target: your debug and release builds will probably have different compiler flags set. In XCode4, go into your target's build settings and look for the "Other Linker Flags" section. You will hopefully find your release linker flags don't have a '-lparsekit' flag.