dej*_*eju 22 objective-c react-native
我react-native run-ios在升级后的RN 运行到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)
Run Code Online (Sandbox Code Playgroud)
我该如何解决?
Jos*_*das 62
运行后解决了以下建议rnpm-plugin-upgrade@0.26:
[...]加
-lc++在Other Linker Flags你的Xcode项目构建设置.
正如评论中指出的那样更新目标构建设置(而不是项目).您可能还需要更新测试目标.
小智 8
当我将 Facebook SDK 添加到我的项目时,出现以下错误:
Showing Recent Messages
Undefined symbol: ___gxx_personality_v0
Undefined symbol: operator delete(void*)
Undefined symbol: std::__1::__next_prime(unsigned long)
Undefined symbol: vtable for std::length_error
Undefined symbol: ___cxa_rethrow
Undefined symbol: vtable for std::out_of_range
Undefined symbol: std::length_error::~length_error()
Undefined symbol: std::out_of_range::~out_of_range()
Undefined symbol: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::append(char const*, unsigned long)
Undefined symbol: std::__1::__shared_weak_count::~__shared_weak_count()
Undefined symbol: ___cxa_end_catch
Undefined symbol: ___cxa_allocate_exception
Undefined symbol: std::logic_error::logic_error(char const*)
Undefined symbol: typeinfo for std::exception
Undefined symbol: typeinfo for std::__1::__shared_weak_count
Undefined symbol: operator new(unsigned long)
Undefined symbol: ___cxa_begin_catch
Undefined symbol: vtable for __cxxabiv1::__si_class_type_info
Undefined symbol: std::__1::__vector_base_common<true>::__throw_length_error() const
Undefined symbol: std::__1::__shared_weak_count::__release_weak()
Undefined symbol: typeinfo for std::out_of_range
Undefined symbol: typeinfo for std::length_error
Undefined symbol: ___cxa_throw
Undefined symbol: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Undefined symbol: std::terminate()
Undefined symbol: std::__1::__basic_string_common<true>::__throw_length_error() const
Undefined symbol: ___cxa_free_exception
Run Code Online (Sandbox Code Playgroud)
这解决了我的问题:
Build Phases--> Link Binary With Libraries--> 添加“ libc++.tbd”。
| 归档时间: |
|
| 查看次数: |
9141 次 |
| 最近记录: |