ld:找不到 -lRCTBlob clang 的库:错误:链接器命令失败

2024-01-25

> Ld
> /Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/MyApp.app/MyApp
> normal x86_64 (in target 'MyApp' from project 'MyApp')
>     cd /Users/ajaysivan/MyApp/OfflineUpgrade/MyApp-offline-app/ios
>     /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
> -target x86_64-apple-ios9.0-simulator -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/BVLinearGradient
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/DoubleConversion
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/FBReactNativeSpec
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/Folly
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/RCTTypeSafety
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/RNDeviceInfo
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/RNVectorIcons
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/React-Core
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/React-CoreModules
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/React-RCTActionSheet
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/React-RCTAnimation
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/React-RCTBlob
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/React-RCTImage
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/React-RCTLinking
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/React-RCTNetwork
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/React-RCTSettings
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/React-RCTText
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/React-RCTVibration
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/React-cxxreact
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/React-jsi
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/React-jsiexecutor
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/React-jsinspector
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/ReactCommon
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/Sentry
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/SentryReactNative
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/Yoga
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/glog
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/react-native-config
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/react-native-geolocation
> -L/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/react-native-netinfo
> -F/Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator
> -filelist /Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/x86_64/MyApp.LinkFileList
> -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -object_path_lto -Xlinker /Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/x86_64/MyApp_lto.o
> -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -ObjC -lBVLinearGradient -lDoubleConversion -lFBReactNativeSpec -lFolly -lRCTTypeSafety -lRNDeviceInfo -lRNVectorIcons -lReact-Core -lReact-CoreModules -lReact-RCTActionSheet -lReact-RCTAnimation -lReact-RCTBlob -lReact-RCTImage -lReact-RCTLinking -lReact-RCTNetwork -lReact-RCTSettings -lReact-RCTText -lReact-RCTVibration -lReact-cxxreact -lReact-jsi -lReact-jsiexecutor -lReact-jsinspector -lReactCommon -lSentry -lSentryReactNative -lYoga -lc++ -lglog -lreact-native-config -lreact-native-geolocation -lreact-native-netinfo -lstdc++ -lz -framework Foundation -framework JavaScriptCore -ObjC -lc++ -Xlinker -sectcreate -Xlinker __TEXT
> -Xlinker __entitlements -Xlinker /Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyApp.build/MyApp.app-Simulated.xcent
> -framework JavaScriptCore -lRCTBlob -lRCTAnimation -lReact -lRCTActionSheet -lRCTGeolocation -lRCTImage -lRCTLinking -lRCTNetwork -lRCTSettings -lRCTText -lRCTVibration -lRCTWebSocket -lPods-MyApp -Xlinker -dependency_info -Xlinker /Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/x86_64/MyApp_dependency_info.dat
> -o /Users/ajaysivan/Library/Developer/Xcode/DerivedData/MyApp-fhlxfvymksoqhsglhalddkzaekrm/Build/Products/Debug-iphonesimulator/MyApp.app/MyApp

.

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

在Xcode11中构建react-native项目时出现上述错误。我最近升级到了 React Native 0.61.5,在 Android 上一切正常。不知道为什么它不能在 iOS 上运行。

我对 iOS 和 React-Native 还很陌生。如果您需要任何进一步的信息,请询问。


我通过按照以下步骤从 xCode 删除所有反应本机库链接解决了该问题,

  1. Open Project.xcworkspacexCode 中的文件
  2. Go to 项目导航器 tab
  3. 单击项目文件夹
  4. 然后在项目名称中选择Targets section
  5. Open 构建阶段 tab
  6. Expand 将二进制文件与库链接 section
  7. 删除所有期望的二进制文件libPods-Project.a

然后重建项目。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

ld:找不到 -lRCTBlob clang 的库:错误:链接器命令失败 的相关文章

随机推荐