ios - 链接器命令退出代码 1

标签 ios cocoapods

我收到链接器错误。

我在这个问题上花了很多时间。

Ld /Users/n/Library/Developer/Xcode/DerivedData/Love-firlokvkfitdaefazzayuqyntwxm/Build/Products/Debug-iphonesimulator/Love.app/Love normal i386
    cd "/Love"
    export IPHONEOS_DEPLOYMENT_TARGET=8.0
    export PATH="/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.1.sdk -L/Users/n/Library/Developer/Xcode/DerivedData/Love_-firlokvkfitdaefazzayuqyntwxm/Build/Products/Debug-iphonesimulator -F/Users/n/Library/Developer/Xcode/DerivedData/Love-firlokvkfitdaefazzayuqyntwxm/Build/Products/Debug-iphonesimulator -F/Love/Pods/Crashlytics -F/Love/Pods/Fabric -filelist /Users/n/Library/Developer/Xcode/DerivedData/Love-firlokvkfitdaefazzayuqyntwxm/Build/Intermediates/Love.build/Debug-iphonesimulator/Love.build/Objects-normal/i386/Love.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=8.0 -Xlinker -objc_abi_version -Xlinker 2 -ObjC -Wl,-U,_JSContextGetGlobalObject -Wl,-U,_JSEvaluateScript -Wl,-U,_JSGlobalContextCreate -Wl,-U,_JSGlobalContextRelease -Wl,-U,_JSObjectCallAsFunction -Wl,-U,_JSObjectIsFunction -Wl,-U,_JSObjectMake -Wl,-U,_JSObjectSetProperty -Wl,-U,_JSStringCopyCFString -Wl,-U,_JSStringCreateWithCFString -Wl,-U,_JSStringRelease -Wl,-U,_JSValueIsObject -Wl,-U,_JSValueIsString -Wl,-U,_JSValueMakeString -Wl,-U,_JSValueToStringCopy -lc++ -lz -framework AFNetworking -framework AMViralSwitch -framework BFPaperTableViewCell -framework CRGradientNavigationBar -framework CarbonKit -framework Crashlytics -framework DACircularProgress -framework FCUUID -framework FMDB -framework Fabric -framework INTULocationManager -framework IQKeyboardManager -framework JGProgressHUD -framework KILabel -framework MKMapView_ZoomLevel -framework MMMaterialDesignSpinner -framework MMobileApi -framework Mantle -framework Masonry -framework MaterialKit -framework Overcoat -framework RESideMenu -framework SDWebImage -framework Security -framework SystemConfiguration -framework TTTAttributedLabel -framework UIAlertView_Blocks -framework UICKeyChainStore -framework UIColor_BFPaperColors -framework UIKit -framework XCDYouTubeKit -framework objc_geohash -fobjc-arc -fobjc-link-runtime -lPods-Love\ Istanbul -weak_framework Pods -Xlinker -dependency_info -Xlinker /Users/n/Library/Developer/Xcode/DerivedData/Love-firlokvkfitdaefazzayuqyntwxm/Build/Intermediates/Love\ Istanbul.build/Debug-iphonesimulator/Love.build/Objects-normal/i386/Love\ Istanbul_dependency_info.dat -o /Users/n/Library/Developer/Xcode/DerivedData/Love_Istanbul-firlokvkfitdaefazzayuqyntwxm/Build/Products/Debug-iphonesimulator/Love.app/Love

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

你能帮我提点建议吗?

最佳答案

我遇到过类似的问题。清理构建文件夹解决了问题。

您还可以尝试设置项目的“链接器搜索路径”(对于调试和发布版本)。如果这个库位于项目的兄弟目录中,那么您可以这样设置它:

$(PROJECT_DIR)/../爱/lib

(你想避免使用绝对路径,而是保持库目录相对于项目)。

关于ios - 链接器命令退出代码 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32717347/

相关文章:

ios - 滚动时更新 UITableViewCell

ios - 如何在 Unity 导出的 iOS App 中使用 Swift Pod

ios - 如何在 iPhone 应用程序的 url 中传递一个字符串值?

ios - NSTimer - 如何在 Swift 中延迟

iphone - 如何使用 Quartz 绘制钢笔笔画?

objective-c - 如何提取 NSArray 的元素并将它们(parseInt)转换为整数值?

ios - CocoaPods 调试.xcconfig : unable to open file in target

ios - 如何在 Xcode 中使用没有 CocoaPod 的任何框架

ios - 快速灵活安装时,如何解决“找不到选项目录”?

ios - 自动选择本地 CocoaPods 框架的正确路径