2

If your trying to run an iphone project downloaded from the internet in Xcode and you encounter "Library not found for -lxxx", where -xxx is some third party library where would you look to set the library path? I am not sure where this is setup, in the SCM->library path is blank and everything else seems to match the configuration window for other working projects

When I look at the build log i see the following in the linker output:

-ObjC -ljson

How can i configure the project to not try to link in that library at build time?

RandomUser
  • 4,140
  • 17
  • 58
  • 94

4 Answers4

4

if using cocoapods and getting this error, try updating the cococapods
$ sudo gem update cocoapods

Then update the pod for the project
$ pod update

I don't know the exact reason but I think it was because the old version didn't set the libraries properly for the new XCode.
Hope this helps.

Nate Hat
  • 408
  • 4
  • 11
  • 1
    I can confirm I was getting this error in xcode 5: ld: library not found for -lPods and following the above fixed it. Thanks Nate:) – Michael Oct 19 '13 at 20:05
3

Within the build tab of project settings there is a field for linker options, I removed the -ljson from here to solve the issue.

RandomUser
  • 4,140
  • 17
  • 58
  • 94
0

This might be helpful in some cases:

Xcode > Preferences > Locations > Locations > Advanced, select Unique.

I was facing a similar issue and chaging to "unique" from "legacy" solved the problem

Brian Mains
  • 50,520
  • 35
  • 148
  • 257
prak253
  • 95
  • 6
0

Either you need to add that library to add your project or you can remove from the project and delete all the reference. This may help you, just click on the library and change the 'required' option.

Community
  • 1
  • 1
Praveen-K
  • 3,401
  • 1
  • 23
  • 31