Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building release version for iOS failed #6

Closed
jinqiupeter opened this issue Mar 8, 2017 · 4 comments
Closed

Building release version for iOS failed #6

jinqiupeter opened this issue Mar 8, 2017 · 4 comments

Comments

@jinqiupeter
Copy link

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)

screen shot 2017-03-08 at 1 26 21 pm

, I tried to upgrade ReactNative to latest version (0.42.0) but didn't help.

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?

@jaggerwang
Copy link
Owner

Do you use Xcode to package? Which version? And a screenshot will be very helpful.

@jinqiupeter
Copy link
Author

jinqiupeter commented Mar 9, 2017

Yes I used latest Xcode, here is it:
screen shot 2017-03-09 at 9 45 51 am

and running on latest macOS:
screen shot 2017-03-09 at 9 47 27 am

this is how I switched to Release:
screen shot 2017-03-09 at 9 46 27 am

here is the output:
screen shot 2017-03-09 at 9 49 44 am

@jaggerwang
Copy link
Owner

You need choose "Gneric iOS Device" when build.

@jinqiupeter
Copy link
Author

jinqiupeter commented Mar 9, 2017

Still got the same error even with Generic iOS Device:
screen shot 2017-03-10 at 12 44 51 am
,

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants