objective-c - 体系结构 x86_64 的 undefined symbol : "std::terminate()", 引用自

标签 objective-c react-native

我在将 RN 升级到 0.26.0-rc 后运行 react-native run-ios 时出现错误。

Undefined symbols for architecture x86_64:
      "std::terminate()", referenced from:
      ___clang_call_terminate in libReact.a(RCTJSCExecutor.o)
  "___cxa_begin_catch", referenced from:
      ___clang_call_terminate in libReact.a(RCTJSCExecutor.o)
  "___gxx_personality_v0", referenced from:
      -[RCTJavaScriptContext initWithJSContext:onThread:] in libReact.a(RCTJSCExecutor.o)
      -[RCTJavaScriptContext init] in libReact.a(RCTJSCExecutor.o)
      -[RCTJavaScriptContext invalidate] in libReact.a(RCTJSCExecutor.o)
      _RCTNSErrorFromJSError in libReact.a(RCTJSCExecutor.o)
      +[RCTJSCExecutor runRunLoopThread] in libReact.a(RCTJSCExecutor.o)
      -[RCTJSCExecutor init] in libReact.a(RCTJSCExecutor.o)
      -[RCTJSCExecutor context] in libReact.a(RCTJSCExecutor.o)
      ...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我该如何解决?

最佳答案

通过 following advice 解决运行后 rnpm-plugin-upgrade@0.26 :

[...] add -lc++ in Other Linker Flags in your xcode project build settings.

正如评论中指出的更新目标build设置(而不是项目)。您可能还需要更新测试目标。

关于objective-c - 体系结构 x86_64 的 undefined symbol : "std::terminate()", 引用自,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37186967/

相关文章:

ios - 在 UITextField 中的字符后添加空格

javascript - 在 react 或 react-native 中处理渲染函数中的多个返回的正确方法是什么

javascript - 如何测试 React Native 模块?

html - document.getElementById ("componentID").clientHeight 总是在 componentDidMount() 函数中给出零

ios - type error null is not an object (evaluating 'ShareDialog.canShow') 在 React Native FBSDK

ios - TableView :didEndEditingRowAtIndexPath: delegate method called twice

ios - 为 iCloud 和 UILocalNotification 更新安排 iOS 后台任务

objective-c - 在不同的类中设置 Bool

objective-c - 带有 EXC_BAD_ACCESS 的简单代码

ios - 无法运行 ios 的 React Native 项目