首页 文章

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

提问于
浏览
2

所以我在一个项目中添加了一些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几次无济于事 . 我也看到了很多其他类似的错误并完成了那些答案所说的,但我仍然得到错误 .

另外,作为附注,早些时候我没有得到这个错误,而是一个'233重复符号的架构x86_64'错误指向一些(读取:很多)一些pods中的Objective-C文件(即ReactiveCocoa) . 在我将Facebook的Pop pod添加到我的Podfile之后,似乎出现了这些错误,但我并没有指出任何指责,因为我很确定这并没有引起所有这些问题 .

拜托,感谢您的帮助!

编辑:这是Podfile:

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并构建 . 希望它应该被修复!

我不确定所有这些步骤是否有必要,但这就是我为我解决的问题 .

1 回答

  • 0

    pod 'SimpleAuth' 添加到您的Podfile并运行 pod install ,看看是否有帮助 .

相关问题