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?

4 Answers 4

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.

1
  • 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
    Commented Oct 19, 2013 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.

0
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.

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.