1. config.h not found

解决:
$ rm -rf ~/.rncache
$ cd node_modules/react-native/third-party/glog-0.3.4/
$ ./configure
2. WebSocket / libfishhook.a 链接文件未找到
error:Build input file cannot be found:‘/Users/.../Libraries/WebSocket/libfishhook.a’__

选中 Libraries - RCTWebSocket.xcodeproj - RCTWebSocket - libfishhook.a 移除重新添加

3. library not found for -lstdc++.6.0.9 库未找到__
ld: library not found for -lstdc++.6.0.9
clang: error :linker command failed with exit code 1 (use -v to see invocation)
Xcode 10 中移除了 “-libstdc++.6.0.9” 库,需要在旧版Xcode 9 中查找到“-lstdc++.6.0.9”库之后,复制一份放入Xcode 10 lib库中。
复制到:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib

如果用真机和者模拟器编译运行,请在iPhoneOS.platform(真机)和iPhoneSimulator.platform(模拟器)两个文件下的lib文件夹分别添加libstdc++6.0.9tbd和libstdc++.6.tbd两个文件。

clean - 重新编译
4. 构建时报 PC_FROM_UCONTEXT 未定义

command 左击进到这个宏定义部分,将原来的 PC_FROM_UCONTEXT 宏定义替换为
#undef HAVE_UCONTEXT_H
#undef PC_FROM_UCONTEXT
#if defined(__x86_64__)
#define PC_FROM_UCONTEXT uc_mcontext->__ss.__rip
#elif defined(__i386__)
#define PC_FROM_UCONTEXT uc_mcontext->__ss.__eip
#endif

网友评论