user3247146
user3247146

Reputation:

library not found for -lPods from GitHub project

I am getting the following error when trying to build a project I found on GitHub.

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

I've heard of some people saying to use the workspace file instead of the workspace file but there is no project file.

Here is the project

Upvotes: 1

Views: 1372

Answers (4)

tarake
tarake

Reputation: 377

My app can run on simulator but can't run on device.

I fixed this by these steps.

  1. The Pods Xcode project now sets the ONLY_ACTIVE_ARCH build setting to YES in the Debug configuration. You will have to set the same on your project/target, otherwise the build will fail.
  2. Ensure your project/target has an ARCHS value set, otherwise the build will fail.
  3. When building a iOS project from the command-line, with the xcodebuild tool that comes with Xcode 4, you’ll need to completely disable this setting by appending to your build command: ONLY_ACTIVE_ARCH=NO.

http://guides.cocoapods.org/using/troubleshooting.html

All my pods project have debug build only active architecture to YES(from pod install), but my project set to NO. So, I change it to YES, then it's work.

Upvotes: 2

user3247146
user3247146

Reputation:

I got it working, all I had to do was simply drag the Pods.xcodeproj into the TestOCR.xcodeproj thanks for the help.

Upvotes: 1

James Frost
James Frost

Reputation: 6990

This project uses Cocoapods to manage its third party dependencies. Whilst the developer has committed the Pods/ directory, it's probably best to install the Pods yourself:

  1. Install Cocoapods if you don't already have it: sudo gem install cocoapods
  2. cd into the top level project directory, and install the required Pods for this project: pod install
  3. Open the TestOCR.xcworkspace that will be created.
  4. Build and run.

Upvotes: 1

Maciej Oczko
Maciej Oczko

Reputation: 1225

I have encountered this issue couple of times and the common fix is to simply build the Pods target.

The project seems to have bad CocoaPods configuration (or not at all). There is no workspace and no Podfile (which is even worse, because if there's a Podfile you can install CocoaPods by your own and update pods).

You can look into Pods directory and try to create Podfile from scratch (depending on found libraries) and the install CocoaPods. This should work.

Upvotes: 0

Related Questions