简体   繁体   中英

Cocoapods ld: library not found for -lPods-ObjectiveSugar

I'm getting this error when I try and build on Xcode (6.4). I have two targets, but for now I just want at least one of them to work.

ld: library not found for -lPods-ObjectiveSugar

Here's my podfile (it is set up for two targets, but I had only one before with same error):

target ‘AppName_iOS' do

pod 'ObjectiveSugar', '~> 1.1'
pod 'SWRevealViewController', '~> 2.3'
pod 'Masonry', '~> 0.6'

pod 'AUISelectiveBordersView', '~> 0.0'
pod 'AFNetworking', '~> 2.6'
#pod 'DSNestedAccordion', '~> 0.1'

pod 'SparkInspector'
pod 'CocoaLumberjack', '~> 2.0'

end

target 'AppName_iOS_CI' do

pod 'ObjectiveSugar', '~> 1.1'
pod 'SWRevealViewController', '~> 2.3'
pod 'Masonry', '~> 0.6'

pod 'AUISelectiveBordersView', '~> 0.0'
pod 'AFNetworking', '~> 2.6'
#pod 'DSNestedAccordion', '~> 0.1'

pod 'CocoaLumberjack', '~> 2.0'

end

I moved ObjectiveSugar down the list and still got issues with it, so I went ahead and removed the library and linked it myself, outside of cocoa pods. The issue still remains.

Tried everything on this post: Cocoapods ld: library not found for -lPods-Projectname

  • Removing and adding the library again (pod install) Deleting the -lPods-Projectname.a in Link Binary ( deleting binary from link binary with libraries on App target, build phases.)

  • Tried Build Active Architectures YES and NO.

  • Tried pod deintegrate and then pod install.

I haven't uninstalled Xcode, and reinstalled cocoa pods, etc… That seems overkill.

Also tried everything in this troubleshooting guide http://guides.cocoapods.org/using/troubleshooting.html (4. If Xcode complains when linking)

Let me know if you need more info. Any help would be appreciated. Thanks.

Finally found the issue.

On Xcode, build settings for the target, I searched for "Other Linker Flags". There I had this:

-l"Pods-ObjectiveSugar

This was some kind of workaround I did several months back to fix some issue. Can't remember what, at this point. Removing it solved the issue.

What I did, just to be safe, was:

  • I deintegrated cocoa pods, using pod deintegrate . Check this link https://github.com/kylef/cocoapods-deintegrate .
  • I searched on the target settings and project file for pod . Anything that looked like it belonged to cocoa pods, I removed.
  • Then I ran pod install once again.

Hope this helps other lost souls.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM