Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xcode build fails with : "_RCTSetLogFunction", referenced from: -[AppTests testRendersWelcomeScreen] in AppTests.o

After upgrade xcode to 10.1 the project's compile fails with :

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)
like image 540
Deian Avatar asked Sep 27 '18 16:09

Deian


1 Answers

The following work around worked for me:

  1. in XCode select the project in the left panel
  2. Click on "Build Settings"
  3. In the "Linking" section, find"Dead Code Stripping" section and change it "No"
  4. Clean and Build

*** In another project I got the same error but in that case the libraries were missing in "Settings of the failing Target"/"Build Phases"/"Link Binary With", so I had to add them manually!

like image 67
Deian Avatar answered Nov 15 '22 06:11

Deian