"directory not found for option" Flurry Analytics Library - ios

Whenever I reopen my XCode project, I always get these errors cause by the flurry analytics library:
ld: warning: directory not found for option '-L/Users/...'
ld: warning: directory not found for option '-LFiles/Flurry'
ld: library not found for -lFlurry_5.0.0
clang: error: linker command failed with exit code 1 (use -v to see invocation)
At first, when the project is opened, it will not build, then if I drag the flurry library to frameworks (even though it is already visibly there), it will build, but there will still be the two warnings.
If I delete the library search paths, then the error and warnings go away, but when I reopen the project, they always come back.
Is there anyway to fix this so the warnings are not always there and I don't have to re-add the library every time I open the project?

There is a reference issue with the library.
Remove existing references in the library search paths.
Remove the Library if present inside the Project folder.
Copy the Library inside the project folder say "Flurry".
Reference the library as a relative path (not absolute) in library search path as "$(SRCROOT)/Flurry"

Related

Cocoapods : ld: library not found for -lBolts

I am using cocoapods in one of my projects and after I cleaned the derived data for my project I have started seeing this error
ld: warning: directory not found for option '-L/Users/vishal/Library/Developer/Xcode/DerivedData/SensorLab-ctzyiyrpdclyjybpujriezgkckkn/Build/Products/Debug-iphoneos/Bolts'
ld: warning: directory not found for option '-L/Users/vishal/Library/Developer/Xcode/DerivedData/SensorLab-ctzyiyrpdclyjybpujriezgkckkn/Build/Products/Debug-iphoneos/DownPicker'
ld: warning: directory not found for option '-L/Users/vishal/Library/Developer/Xcode/DerivedData/SensorLab-ctzyiyrpdclyjybpujriezgkckkn/Build/Products/Debug-iphoneos/MBProgressHUD'
ld: warning: directory not found for option '-L/Users/vishal/Library/Developer/Xcode/DerivedData/SensorLab-ctzyiyrpdclyjybpujriezgkckkn/Build/Products/Debug-iphoneos/Parse'
ld: warning: directory not found for option '-L/Users/vishal/Library/Developer/Xcode/DerivedData/SensorLab-ctzyiyrpdclyjybpujriezgkckkn/Build/Products/Debug-iphoneos/SCLAlertView-Objective-C'
ld: library not found for -lBolts
clang: error: linker command failed with exit code 1 (use -v to see invocation)
When I open up the Debug-iphoneos from Window > Projects I do not see any folders in there now. Since this problem started cropping up after cleaning derived data I do not really know what did I do which stopped generating those folders.
This is how it looks :
This is kind of how it should look, I imagine (From a different project)
I have tried what was suggested here
Cocoapods ld: library not found for -lPods-Projectname
Cocoapods ld: library not found for -lPods-ObjectiveSugar
And a couple more things which I have tried but to no avail, I have faced my fair share of cocoapod niggles. This seems beyond me.
EDIT: I have been doing some more tests with this, I realized that my pods are not even building ! When I clear derived data for any other project, it goes ahead and builds the Pods next time I try to build the project, but not in this project. What setting can wrong ?
This is how the project looks right now :
Any help will be appreciated.
Clean up cocoa pods and install them again.
You can also use tool - https://github.com/CocoaPods/cocoapods-deintegrate
Somehow the option of Find Implicit Dependencies got turned off in the build scheme. SMH.
Hope this can help someone in the future.

Library not fount -lPods

I got follwing errro in my application.
ld: warning: directory not found for option '-L/Users/idev/Desktop/Swami/Project/Sources/Xcode/chronicle/chronicle/Vendor/openssl-1.0.1e/lib'
ld: library not found for -lPods
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Please help me...
You need to open ".xcworkspace" instead of ".xcodeproj". the .xcworkspace is generated when you install pod on the project.
Xcode is not able to find the library, and hence the library error. Click on the project target, go to build settings, under search paths -> frameworks search paths, delete paths. You may have moved your desktop folder along with the library.
It seems project has been using http://cocoapods.org/. and that files are missing from your project.
You cant just download it from git. You need to install it from cocoapods.
you may follow Introduction to http://www.raywenderlich.com/64546/introduction-to-cocoapods-2 Tutorial

Library Search Paths randomly delete

I have a project that was working fine and compiling. When I went to update Google ad SDK to 6.8.0
My library paths started to go crazy, it was saying that Testflight library search path was missing, when I didnt even touch it.
I would re-add the path and nothing, same error, deleting the files, would result in errors with Google SDK and Flurry library search paths going missing.
This however would be fixed by me dragging and dropping the .libs into "Link Binary with Libraries"
And it would work fine until i closed out Xcode, then came back later to continue work, I would have to re-add the libs to "Link Binary with Libraries" every time I open xcode.
Is this just a bug, or am I missing something here.
(Xcode 5.1.1)
This is the error
ld: warning: directory not found for option '-L/Users/anthonytaylor/Documents/iOS workspace/London-OnTime/London'
ld: warning: directory not found for option '-LOnTime/GoogleAdMobAdsSdkiOS-6.8.0'
ld: warning: directory not found for option '-LOnTime'
ld: library not found for -lGoogleAdMobAds
clang: error: linker command failed with exit code 1 (use -v to see invocation)
My Folder containing the xcodeproj is London-OnTime, the folder containing the sourcecode is London OnTime
It looks like when xcode launches, it doesnt handle the space correctly in the name.
The problem was the way Xcode generated the search paths, I manually entered them in as
"$(SRCROOT)/London OnTime/GoogleAdMobAdsSdkiOS-6.8.0"
"$(SRCROOT)/London OnTime/
and that fixed it.

clang: error: linker command failed with exit code 1, only when testing on device

I was just about to test my app on a device when I ran into this problem, I'm getting this Linker Error.
I've already checked all my compile sources and Build Phases, but there's no sign of my importing things twice.
ld: duplicate symbol _calculateNextSearchPage in /Users/wouter/Sites/test/FastPdfKit.embeddedframework/FastPdfKit.framework/FastPdfKit(FastPdfKit) and /Users/wouter/Sites/test/FastPdfKit.embeddedframework/FastPdfKit.framework/FastPdfKit(FastPdfKit) for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This only happens when testing on a device, not in the simulator.
Alright guys I had the same problem. Seems like I fixed it.
I am using cocapods therefor the described standard procedure can not be properly executed.
Steps to do to properly add FastPDFKit with Cocoapods.
Download FastPDFKit
In your project Add Files to "Your Project"
go to FastPDFKit folder you just have downloaded
locate 1 folder and 1 project file. Press and hold Command key and add these in to your project
FastPdfKit.xcodeproj
FastPdfKit.embeddedframework
(Note: FastPdfKit.embeddedframework is the actual Framework and you
might want to open FastPdfKit.xcodeproj standalone before adding it
to your project, delete FastPdfKit.embeddedframework folder from
your disk and Build FastPdfKit target in the project. You should see
newly created FastPdfKit.embeddedframework folder)
Go to your Project Settings > Your target > Build Phases > Link Binary with Libraries
Make sure FastPdfKit.framework is there.
If not, drag it from the project and put it there.
Clean the project, delete derived data
Add #import <FastPdfKit/FastPdfKit.h> where you need it and you are good to go.
Here is how my Link Binary with Libraries look like
Please let me know if you have any troubles I might've missed something.
Try to delete duplicate files/images which are in target-> Build phase -> Compile files, Copy bundle resources

Linker errors building iOS app with Simperium

I'm getting linker errors when integrating Simperium into my app:
ld: duplicate symbol _OBJC_CLASS_$_DDASLLogger in
/Users/zulfi_shah/Documents/ContactsJournal-TestSimperium/SimpleList/Simperium.framework/Simperium(DDASLLogger.o) and
/Users/zulfi_shah/Library/Developer/Xcode/DerivedData/SimpleList-cxdtxuubxyczhgcyxbixtjtvzkct/Build/Intermediates/SimpleList.build/Debug-iphonesimulator/SimpleList.build/Objects-normal/i386/DDASLLogger.o
for architecture i386 clang: error: linker command failed with exit
code 1 (use -v to see invocation)
The issue seems to be with DDASLLogger which is included in CocoaHTTP package. I also saw the same issue with Reachability classes before.
How do I ensure Simperium framework plays nice with other libraries in my binary?
Thanks.
We're updating the library on our end to avoid these name clashes. This should be fixed soon.
In the meantime, if you encounter this problem (with Simperium or any other library) you can remove your own versions of the conflicting library from your target. You can do this in a couple ways:
Select each corresponding file for the conflicting library, open the browser on the right, and uncheck the box next to your target name.
Select your Project, then your target, go to Build Phases | Compile Sources, and remove the source files for the conflicting library.
This is not very friendly, hence why we'll be fixing it soon.

Resources