gpt4 book ai didi

ios - Xcode - 'library not found for -lPods-[Pod]'

转载 作者:行者123 更新时间:2023-12-01 16:30:09 25 4
gpt4 key购买 nike

所以我在一个项目中添加了一些 Cocoapods,现在当我构建时,我收到以下错误:

Ld Build/Products/Debug-iphonesimulator/[AppName].app/[AppName] normal x86_64
cd /Users/[username]/Developer/[AppName]
export IPHONEOS_DEPLOYMENT_TARGET=8.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/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/iPhoneSimulator8.4.sdk -L/Users/[username]/Developer/[AppName]/Build/Products/Debug-iphonesimulator -L/Users/[username]/Developer/[AppName] -F/Users/[username]/Developer/[AppName]/Build/Products/Debug-iphonesimulator -filelist /Users/[username]/Developer/[AppName]/Build/Intermediates/[AppName].build/Debug-iphonesimulator/[AppName].build/Objects-normal/x86_64/[AppName].LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -objc_abi_version -Xlinker 2 -ObjC -lCMDQueryStringSerialization -lISO8601 -lReactiveCocoa -lSimpleAuth -lc++ -lpop -framework Foundation -framework UIKit -lPods-CMDQueryStringSerialization -lPods-ISO8601 -lPods-ReactiveCocoa -lPods-SimpleAuth -framework Foundation -framework UIKit -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=8.0 -framework MapKit -framework CoreLocation -lPods -Xlinker -dependency_info -Xlinker /Users/[username]/Developer/[AppName]/Build/Intermediates/[AppName].build/Debug-iphonesimulator/[AppName].build/Objects-normal/x86_64/[AppName]_dependency_info.dat -o /Users/[username]/Developer/[AppName]/Build/Products/Debug-iphonesimulator/[AppName].app/[AppName]

ld: library not found for -lPods-CMDQueryStringSerialization
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我已经多次卸载并重新安装了工作区中的所有 Cocoapods,但均无济于事。我还看到了许多其他类似的错误,并按照这些答案所说的做了,但我仍然收到错误。

另外,作为旁注,早些时候我没有收到此错误,而是“架构 x86_64 的 233 个重复符号”错误指向某些 pod(即 ReactiveCocoa)中的一些(阅读:很多)Objective-C 文件。似乎这些错误是在我将 Facebook 的 Pop pod 添加到我的 Podfile 之后出现的,但我没有指责任何人,因为我很确定这不会导致所有这些问题。

请并感谢您的帮助!

编辑:
这是 Pod 文件:
pod 'SimpleAuth/LinkedInWeb'
pod 'SimpleAuth/GoogleWeb'
pod 'pop', '~> 1.0'

inhibit_all_warnings!

更新和修复:

好的,所以我已经解决了这个问题。这是我所做的:
  • 删除任何导致错误的 pod。
  • 删除派生数据子文件夹。
  • 在 Build Settings -> Other Linker Flags 中删除任何显式的“-lPods-[Pod]”链接器标志。
  • 退出/重新启动 Xcode。
  • 添加回 pod 并运行 pod install .
  • 打开 .xcworkspace 并构建。希望它应该被修复!

  • 我不确定所有这些步骤的必要性,但这就是我为自己修复它所做的。

    最佳答案

    添加 pod 'SimpleAuth'到您的 Podfile 并运行 pod install ,看看有没有帮助。

    关于ios - Xcode - 'library not found for -lPods-[Pod]',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32191922/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com