RandomUser
RandomUser

Reputation: 4220

Library not found for -lXXX

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?

Upvotes: 2

Views: 14859

Answers (4)

prak253
prak253

Reputation: 95

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

Upvotes: 0

Nate Hat
Nate Hat

Reputation: 418

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.

Upvotes: 4

RandomUser
RandomUser

Reputation: 4220

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

Upvotes: 3

Praveen-K
Praveen-K

Reputation: 3401

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.

Upvotes: 0

Related Questions