Ben Zhang
Ben Zhang

Reputation: 1291

Xcode Compiler Error: ld: library not found for -lPods

I'm trying to use the pod library to the project "BC LitterBox", after install pod according to http://cocoapods.org/ and Complier LitterBox, I'm now down to 1 compilation error, which I can't seem to get rid of.

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

Anyone know what could be causing this?

Upvotes: 0

Views: 5063

Answers (4)

Oleksandr
Oleksandr

Reputation: 41

When I try compile my project which used CocoaPods I have following linking error:

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

The reason of this problem is version of CocoaPods. Project was cloned from repo, then pods was installed. But my version of cocoapods is 1.0.1. Version of cocoapods which declared in Podfile.lock is 0.39.0.

Solution is following(In terminal):
1) Uninstall CocoaPods.
sudo gem uninstall cocoapods

2) Install version of cocoapods which declared in the Podfile.lock
sudo gem install cocoapods -v 0.39.0

3) You can check version cocoapods:
gem which cocoapods

4) Clone project then install dependencies
pod install

Upvotes: 0

Haroldo Gondim
Haroldo Gondim

Reputation: 7993

You can perform this steps:

  • Close .xcworkspace and .xcproject (Xcode Projects);
  • Run pod install and pod update;
  • Open the new .xcworkspace;
  • Clean and Build your Project;
  • Now, you are able to run normally.

Upvotes: 0

Bryan
Bryan

Reputation: 3219

Make sure you are opening the .xcworkspace file, not the .xcodeproj

Upvotes: 1

Kevin Enax
Kevin Enax

Reputation: 176

When you install a pod, CocoaPods creates a new workspace that includes your project and whatever pod(s) you installed.

You'll have to close your project and open that workspace.

Upvotes: 3

Related Questions