Building release version for iOS failed
Closed this issue · 4 comments
When I try to build a release version for iOS, the following error occurred:
Undefined symbols for architecture i386:
"___gxx_personality_v0", referenced from:
_RCTDefaultLogFunction_block_invoke in libReact.a(RCTLog.o)
_RCTFormatLog in libReact.a(RCTLog.o)
___RCTAddLogFunction_block_invoke in libReact.a(RCTLog.o)
_RCTPerformBlockWithLogFunction in libReact.a(RCTLog.o)
_RCTPerformBlockWithLogPrefix in libReact.a(RCTLog.o)
RCTGetLocalLogFunction() in libReact.a(RCTLog.o)
___RCTPerformBlockWithLogPrefix_block_invoke in libReact.a(RCTLog.o)
...
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I also tried to build release version for vanilla React Native project (generated by react-native init AweSomeProject), it worked properly, so there might be something wrong in the libraries used here, e.g. react-native-wechat, react-native-video etc.
@jaggerwang would you please take a look?
Do you use Xcode to package? Which version? And a screenshot will be very helpful.
You need choose "Gneric iOS Device" when build.
Still got the same error even with Generic iOS Device:
,
But then I googled and realized that this is already an open issue for RN, and there is a workaround for it, so I did what suggested (add -lc++ to Other Linker Options for the test target) and fixed the problem.
Thanks for your time anyways!
Maybe this should be listed in Known Issues?