Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cocoa Pods Error ld: library not found for -lPods

I'm getting a error from cocoa pods that I've never seen before. I've had it working with several dependencies just fine. I recently added the TestFlightSDK as a dependency through pods and I'm unable to Archive the project. It builds just fine to devices but refuses to Archive. Has anyone else experienced this issue?

ld: library not found for -lPods
clang: error: linker command failed with exit code 1 (use -v to see invocation)

My Library Search Paths looks like this (for both debug and release):

$(SRCROOT)  recursive
$(PODS_ROOT)  recursive
$(inherited)   recursive
like image 411
anders Avatar asked Jan 21 '14 16:01

anders


2 Answers

Ok so I found the answer (that worked for me) using some suggestions from this post

I was actually getting a different Warning that I hadn't noticed.

Pods was rejected as an implicit dependency for 'libPods.a' because its
architectures 'armv7 armv7s' didn't contain all required architectures
'armv7 armv7s arm64'

It was actually related to the Pods target not having the correct architectures. It turned out to be a xCode bug after all. In my Pods Target I had all the correct acrhitectures selected, armv7, armv7s, and arm64.

THE SOLUTION:

  1. Update cocoapods to the newest version that supports 64 arch.

    sudo gem update cocoapods
    
  2. Delete all Valid Architectures and do a project clean (which fails alot..)

  3. Re-Add the architectures that you just removed and voilà!
like image 132
anders Avatar answered Nov 15 '22 06:11

anders


my fault was an old cocoa pods integration. had to delete the pod-.a files in "/Frameworks" folder and pod-.xcconfig in "/Pods".

-> run 'pod install'

everything fine

like image 39
gon Avatar answered Nov 15 '22 06:11

gon