代码之家  ›  专栏  ›  技术社区  ›  Deian

xcode生成失败,引用自AppTests.o中的-[AppTests testRendersWelcomeScreen]:“\u RCTSetLogFunction”

  •  0
  • Deian  · 技术社区  · 7 年前

    将xcode升级到10.1后,项目的编译失败:

    ld: warning: directory not found for option '-L/Users/divanov/Desktop/<projectName> AppTests'
    Undefined symbols for architecture arm64:
      "_RCTSetLogFunction", referenced from:
          -[AppTests testRendersWelcomeScreen] in AppTests.o
    ld: symbol(s) not found for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    
    1 回复  |  直到 7 年前
        1
  •  14
  •   Deian    7 年前

    1. 在XCode中,选择左侧面板中的项目
    2. 单击“生成设置”
    3. 在“链接”部分,找到“死代码剥离”部分并将其更改为“否”
    4. 清洁和建造

    ***在另一个项目中,我得到了相同的错误,但在这种情况下,库丢失在“设置失败的目标”/“构建阶段”/“链接二进制”,所以我不得不手动添加它们!