JUCE and React Native - linker error “ld: library not found for -lReact”

前端 未结 4 1046
-上瘾入骨i
-上瘾入骨i 2021-01-14 20:01

I\'m getting this linker error using CocoaPods with React Native: ld: library not found for -lReact

I have followed the guide at https://facebook.githu

相关标签:
4条回答
  • 2021-01-14 20:09

    Some steps may not be necessary and bring concerns of other, larger issues being hidden. Specifically:

    adjust GCC_PREPROCESSOR_DEFINITIONS to include $(inherited)
    

    Namely, pod install scripts are supposed to do the $(inherited) magic for you.

    Could a configuration reset be of help?

    0 讨论(0)
  • 2021-01-14 20:15

    Go to your Project -> Your Target -> Build Settings -> Link Binary With Libraries and you might see some red entries there referring to the React library files here. Just remove those red entries and you should be good to go.

    0 讨论(0)
  • 2021-01-14 20:22

    I looked for differences between the Introjucer generated project and the Xcode generated one.

    One significant difference was the CONFIGURATION_BUILD_DIR or "Per-configuration Build Products Path"

    I copied over the setting from the Xcode generated project $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)

    This allowed the linking to complete and gave a successful build :)

    0 讨论(0)
  • 2021-01-14 20:22

    Go to your Project -> Your Target -> Build Phases -> Link Binary With Libraries and you might see some red entries there referring to the React library files here. Just remove those red entries and you should be good to go.

    If there are no red entries, then just check that the list of libs in Link Binary With Libraries list has no items which you removed from React project using 'npm uninstall lib_name' command.

    0 讨论(0)
提交回复
热议问题