Premal Khetani
Premal Khetani

Reputation: 3195

ld: library not found for -lPayPalMobile ios

i am working with xcode 6.1 on paypal integration.

i am getting following error each time when i open the project.

ld: library not found for -lPayPalMobile

clang: error: linker command failed with exit code 1 (use -v to see invocation)

every time i have to remove library search paths value and remove reference of paypal folder and again import it to project.

what is the problem i don't know please tell me what to do?

Edited

one thing more that if project name is "This is test" then what will be difference? because i can see in library search paths that in first row "This" is coming in second row only "is" is there and in last (i.e. 3rd row) "test" is there.

Thank you.

Upvotes: 3

Views: 1171

Answers (3)

E-Riddie
E-Riddie

Reputation: 14780

As @Anuj mentioned this can be a problem related with Library Search Paths. Cocoa Pods sometimes gets a mess when updating it, or installing it again if you have it or not under Source Control.

I solved this problem right now by adding this flag under Library Search Paths:

$(inherited)

Hope it helps you

Upvotes: 1

Vishal Sharma
Vishal Sharma

Reputation: 1733

Follow Below steps,

(1) Add Static library in Your project bundle.

(2) Add it in "link binary with libraries"

You need to go to your Target -> Build phase -> link binary with libraries. as attached in below image.enter image description here

(3) Give proper header search path for your linked library. i.e. ($PROJECT_DIR)/Your path.

You can also read the steps that given in GitHub link of PayPal, which give you proper direction.

Feel free to ask if you need more help regarding this.

Upvotes: 2

Anuj Rajput
Anuj Rajput

Reputation: 844

This is usually Header or Library Search Paths. It's better to use CocoaPods to manage your project dependancies. CocoaPods is the dependency manager for Objective-C projects. It has thousands of libraries and can help you scale your projects elegantly. You can import any static library using simple Podfile and command line.

Once you start using CocoaPods, you won't have to worry about header or library search paths. PayPal also has a spec in the CocoaPods Spec repository.

Upvotes: 0

Related Questions