【问题标题】:error: library not found for -lPods错误:找不到 -lPods 的库
【发布时间】:2018-03-28 03:22:20
【问题描述】:

我用 AFNetworking 和 lumberjack 下载了这个项目,但它无法编译。 以下是我收到的错误,你能指导我如何解释它,如果你知道错误是什么?

Ld /Users/nader/Library/Developer/Xcode/DerivedData/SmartConfigCC31XX-axrpiaydjwsrwxhbpqketglbghrz/Build/Products/Debug-iphonesimulator/SimpleLink\provisioning.app/SimpleLink\配置正常x86_64 cd /Users/nader/Documents/iOS/source 导出 IPHONEOS_DEPLOYMENT_TARGET=7.0 export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/ usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11。 0.sdk -L/Users/nader/Library/Developer/Xcode/DerivedData/SmartConfigCC31XX-axrpiaydjwsrwxhbpqketglbghrz/Build/Products/Debug-iphonesimulator -L/Users/nader/Library/Developer/Xcode/DerivedData/SmartConfigCC31XX-axrpiaydjwsrwxhbpqketglbghrz/Build/ Products/Debug-iphonesimulator/AFNetworking -L/Users/nader/Library/Developer/Xcode/DerivedData/SmartConfigCC31XX-axrpiaydjwsrwxhbpqketglbghrz/Build/Products/Debug-iphonesimulator/CocoaLumberjack -L/Users/nader/Documents/iOS/source/SmartConfigCC31XX - L/Users/nader/Documents/iOS/source/build/Debug-iphoneos -F/Users/nader/Library/Developer/Xcode/DerivedData/SmartConfigCC31XX-axrpiaydjwsrwxhbpqketglbghrz/Build/Products/Debug-iphonesimulator -F/Users/nader/ Documents/iOS/source -filelist /Users/nader/Library/Developer/Xcode/Deri vedData/SmartConfigCC31XX-axrpiaydjwsrwxhbpqketglbghrz/Build/Intermediates.noindex/SmartConfigCC31XX.build/Debug-iphonesimulator/SmartConfigCC31XX.build/Objects-normal/x86_64/SimpleLink\ provisioning.LinkFileList -mios-simulator-version-min=7.0 -dead_strip -Xlinker - object_path_lto -Xlinker /Users/nader/Library/Developer/Xcode/DerivedData/SmartConfigCC31XX-axrpiaydjwsrwxhbpqketglbghrz/Build/Intermediates.noindex/SmartConfigCC31XX.build/Debug-iphonesimulator/SmartConfigCC31XX.build/Objects-normal/x86_64/SimpleLink\ provisioning_lto.o - Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -ObjC -lAFNetworking -lCocoaLumberjack -framework CoreGraphics -framework MobileCoreServices -framework Security -framework SystemConfiguration -ObjC -lAFNetworking -lCocoaLumberjack -framework CoreGraphics -framework MobileCoreServices -framework Security -framework SystemConfiguration -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitl元素 -Xlinker /Users/nader/Library/Developer/Xcode/DerivedData/SmartConfigCC31XX-axrpiaydjwsrwxhbpqketglbghrz/Build/Intermediates.noindex/SmartConfigCC31XX.build/Debug-iphonesimulator/SmartConfigCC31XX.build/SimpleLink\provisioning.app.xcent -lFirstTimeConfig -lCocoaLumberjack -框架 SystemConfiguration -framework Security -framework AVFoundation -liconv -framework QuartzCore -framework CoreVideo -framework CoreMedia -framework CoreGraphics -framework UIKit -framework Foundation -lPods -lPods-SmartConfigCC31XX -Xlinker -dependency_info -Xlinker /Users/nader/Library/Developer/Xcode /DerivedData/SmartConfigCC31XX-axrpiaydjwsrwxhbpqketglbghrz/Build/Intermediates.noindex/SmartConfigCC31XX.build/Debug-iphonesimulator/SmartConfigCC31XX.build/Objects-normal/x86_64/SimpleLink\ provisioning_dependency_info.dat -o /Users/nader/Library/Developer/Xcode/DerivedData /SmartConfigCC31XX-axrpiaydjwsrwxhbpqketglbghrz/Build/Products/Debug-iphonesimulator/SimpleLink\provisioning.app/SimpleLink\ prov异化

ld: 找不到 -lPods 的库 clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)

【问题讨论】:

  • 您是否打开了.xcodeproj 文件或者您打开了.xcworkspace 文件?
  • 我正在使用 hte xcworkspace

标签: ios xcode afnetworking afnetworking-3


【解决方案1】:
  1. pod 安装
  2. 从 .xcworkspace 打开您的项目
  3. 重建

【讨论】:

  • 我已经试过用xcworkspace打开了,没用
  • 您是否尝试清理您的项目和派生数据?
  • 是的,我做到了。我做了一个清洁,然后按照以下说明操作:stackoverflow.com/questions/38227783/…
  • 您能否分享您的 pod 文件以及您的 Target 构建设置中的 Link with Binary 部分的屏幕截图?
【解决方案2】:

转到: Yourproject -> Manage scheme -> 勾选 Pods-YourProject

它会将 pods 项目添加到您的项目中。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-03-05
    • 2015-08-16
    • 2016-09-16
    • 2014-06-25
    • 1970-01-01
    • 2015-10-01
    • 2015-12-22
    • 2015-12-19
    相关资源
    最近更新 更多