简体   繁体   中英

How to fix Apple Mach-O Linker (ld) Error Group - ld: library not found for -lFBSDKCoreKit

it's been several days now that I get this error, I tried several solutions like:

  • I always open the .xcworkspace file

  • I always clean the project and relaunch

  • I always restart xcode and relaunch

  • I remove the library search paths from the .xconfig files and
    relaunch

  • I remove the OTHER_LDFLAGS from the .xconfig files and relaunch

  • I remove the app's folder from the DerivedData

My pod file content:

pod 'Firebase'
pod 'Bolts'
pod 'Firebase/Firestore'
pod 'GoogleMobileAds'
pod 'Fabric'
pod 'Crashlytics'
pod 'PersonalizedAdConsent'
pod 'Highcharts', '~> 6.1.0'
pod 'FBSDKCoreKit'
pod 'GoogleToolboxForMac'
pod 'FirebaseAnalytics'

the full error :

Ld /Users/macbook/Library/Developer/Xcode/DerivedData/MyApp-gydeutwlcipqlofsryockyhughug/Build/Products/Debug-iphoneos/MyApp.app/MyApp normal arm64
    cd "/Users/macbook/Documents/app ios /MyApp New"
    export IPHONEOS_DEPLOYMENT_TARGET=11.0
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.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 arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk -L/Users/macbook/Library/Developer/Xcode/DerivedData/MyApp-gydeutwlcipqlofsryockyhughug/Build/Products/Debug-iphoneos -F/Users/macbook/Library/Developer/Xcode/DerivedData/MyApp-gydeutwlcipqlofsryockyhughug/Build/Products/Debug-iphoneos -F/Users/macbook/Documents/app\ ios\ /MyApp\ New -filelist /Users/macbook/Library/Developer/Xcode/DerivedData/MyApp-gydeutwlcipqlofsryockyhughug/Build/Intermediates.noindex/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/MyApp.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -miphoneos-version-min=11.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/macbook/Library/Developer/Xcode/DerivedData/MyApp-gydeutwlcipqlofsryockyhughug/Build/Intermediates.noindex/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/MyApp_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fembed-bitcode-marker -fobjc-arc -fobjc-link-runtime -ObjC -lBoringSSL -lFBSDKCoreKit -lGoogleToolboxForMac -lProtobuf -lc++ -lgRPC -lgRPC-Core -lgRPC-ProtoRPC -lgRPC-RxLibrary -lleveldb-library -lnanopb -lsqlite3 -lz -framework AVFoundation -framework AudioToolbox -framework CFNetwork -framework CoreGraphics -framework CoreMedia -framework CoreMotion -framework CoreTelephony -framework CoreVideo -framework FirebaseAnalytics -framework FirebaseCore -framework FirebaseCoreDiagnostics -framework FirebaseFirestore -framework FirebaseInstanceID -framework FirebaseNanoPB -framework GLKit -framework GoogleMobileAds -framework MediaPlayer -framework MessageUI -framework MobileCoreServices -framework OpenGLES -framework QuartzCore -framework Security -framework StoreKit -framework SystemConfiguration -weak_framework Accounts -weak_framework AdSupport -weak_framework AudioToolbox -weak_framework CoreGraphics -weak_framework CoreLocation -weak_framework Foundation -weak_framework JavaScriptCore -weak_framework QuartzCore -weak_framework SafariServices -weak_framework Security -weak_framework Social -weak_framework UIKit -weak_framework WebKit -framework FBSDKCoreKit -framework WebKit -framework AVFoundation -framework CoreMedia -framework QuartzCore -framework AdSupport -framework CoreGraphics -framework SystemConfiguration -framework CoreTelephony -framework StoreKit -framework CoreFoundation -framework Foundation -framework GoogleMobileAds -framework CoreData -framework UIKit -Xlinker -dependency_info -Xlinker /Users/macbook/Library/Developer/Xcode/DerivedData/MyApp-gydeutwlcipqlofsryockyhughug/Build/Intermediates.noindex/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/MyApp_dependency_info.dat -o /Users/macbook/Library/Developer/Xcode/DerivedData/MyApp-gydeutwlcipqlofsryockyhughug/Build/Products/Debug-iphoneos/MyApp.app/MyApp

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

please help me fix this error

重新安装/更新Pod,然后从“ 构建设置”中将“ Build Active Architecture Only Yes 构建为“ Yes

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