简体   繁体   中英

Xcode library not found -lpods. Clang: error: linker command failed with exit code 1

I know it is a repeated question but I've tried the solutions available in Stack Overflow and noting helped me. I'm adding MWPhotoBrowser via pod and it is happening. Anything I add it results in the same error. Here are the logs:

Ld /Users/vijaykas/Library/Developer/Xcode/DerivedData/MyProj-fxonghiiueuyuoeclquaxlqzofjh/Build/Intermediates/MyProj.build/Debug-iphonesimulator/MyProj.build/Objects-normal/i386/MyProj normal i386
    cd /Users/vijaykas/MyProj/source/2015/Test/cf_re_ios_app/MyProj
    export 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 i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.1.sdk -L/Users/vijaykas/Library/Developer/Xcode/DerivedData/MyProj-fxonghiiueuyuoeclquaxlqzofjh/Build/Products/Debug-iphonesimulator -L/Users/vijaykas/MyProj/source/2015/Test/cf_re_ios_app/MyProj/src/libraries/Flurry -L/Users/vijaykas/MyProj/source/2015/Test/cf_re_ios_app/MyProj/src/libraries/Vizury -L/Users/vijaykas/MyProj/source/2015/Test/cf_re_ios_app/MyProj/src/libraries/Helpshift -L/Users/vijaykas/MyProj/source/2015/Test/cf_re_ios_app/MyProj/src/libraries/Notiphi -L/Users/vijaykas/MyProj/source/2015/Test/cf_re_ios_app/MyProj/src/libraries -L/Users/vijaykas/MyProj/source/2015/Test/cf_re_ios_app/MyProj/src/libraries/GoogleAnalyticsV3.12 -L/Users/vijaykas/MyProj/source/2015/Test/cf_re_ios_app/MyProj/src/libraries/Localytics-iOS-3.5.0 -L/Users/vijaykas/MyProj/source/2015/Test/cf_re_ios_app/MyProj/build/Debug-iphoneos -F/Users/vijaykas/Library/Developer/Xcode/DerivedData/MyProj-fxonghiiueuyuoeclquaxlqzofjh/Build/Products/Debug-iphonesimulator -F/Users/vijaykas/MyProj/source/2015/Test/cf_re_ios_app/MyProj -filelist /Users/vijaykas/Library/Developer/Xcode/DerivedData/MyProj-fxonghiiueuyuoeclquaxlqzofjh/Build/Intermediates/MyProj.build/Debug-iphonesimulator/MyProj.build/Objects-normal/i386/MyProj.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=7.0 -Xlinker -objc_abi_version -Xlinker 2 -all_load -ObjC -fobjc-arc -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -force_load -Xlinker /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a -Xlinker -add_ast_path -Xlinker /Users/vijaykas/Library/Developer/Xcode/DerivedData/MyProj-fxonghiiueuyuoeclquaxlqzofjh/Build/Intermediates/MyProj.build/Debug-iphonesimulator/MyProj.build/Objects-normal/i386/MyProj.swiftmodule -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/vijaykas/Library/Developer/Xcode/DerivedData/MyProj-fxonghiiueuyuoeclquaxlqzofjh/Build/Intermediates/MyProj.build/Debug-iphonesimulator/MyProj.build/MyProj.app.xcent -framework WebKit -lAdIdAccess -lGoogleAnalyticsServices -framework CoreTelephony -framework MediaPlayer -framework CoreMotion -framework AssetsLibrary -framework AddressBook -framework Crashlytics -framework MobileAppTracker -lVizuryEventLogger -framework AdSupport -framework iAd -framework MobileCoreServices -lNotifyManager -weak_framework SystemConfiguration -weak_framework Security -weak-lz -weak-lsqlite3.0 -lFlurry_5.0.0 -lLocalytics -weak_framework CoreText -framework CoreLocation -framework CoreData -framework MessageUI -framework AVFoundation -framework AddressBookUI -framework QuartzCore -lHelpshift -framework CFNetwork -framework MapKit -framework GooglePlus -framework FacebookSDK -framework UIKit -framework Foundation -framework CoreGraphics -framework MobileDeepLinking -framework GoogleOpenSource -lPods -Xlinker -dependency_info -Xlinker /Users/vijaykas/Library/Developer/Xcode/DerivedData/MyProj-fxonghiiueuyuoeclquaxlqzofjh/Build/Intermediates/MyProj.build/Debug-iphonesimulator/MyProj.build/Objects-normal/i386/MyProj_dependency_info.dat -o /Users/vijaykas/Library/Developer/Xcode/DerivedData/MyProj-fxonghiiueuyuoeclquaxlqzofjh/Build/Intermediates/MyProj.build/Debug-iphonesimulator/MyProj.build/Objects-normal/i386/MyProj

Ld: warning: directory not found for option '-L/Users/vijaykas/MyProj/source/2015/Test/cf_re_ios_app/MyProj/build/Debug-iphoneos'
ld: library not found for -lPods
clang: error: linker command failed with exit code 1 (use -v to see invocation)

You must open <YourProject>.xcworkspace instead of <YourProject>.xcodeproj .

The xcworkspace contains your project and your pods .

You also can follow this steps:

  • Uninstall the App from Device or Simulator .
  • Make sure close all Xcode Projects. ( .xcworkspace and .xcproject ) (sometimes .xcproject still open)
  • Run pod install and pod update
  • Open the .xcworkspace
  • Clean and Build your Project

After that you should be able to run normally.

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