Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Undefined symbols for architecture x86_64: "std::terminate()", referenced from

I got the error when i run react-native run-ios after upgraded RN to 0.26.0-rc.

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)

How can i fix it?

like image 599
deju Avatar asked Sep 05 '25 16:09

deju


1 Answers

Resolved with the following advice after running [email protected]:

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

As pointed out in comments update target build settings (and not project). You may also need to update the Test target as well.

like image 99
vhs Avatar answered Sep 07 '25 16:09

vhs