objc4-781 源码编译

2020-09-28  本文已影响0人  一个半吊子工程师

准备

环境版本 & 最新objc源码
mac OS 10.15
Xcode 11.4
objc4-781

源码编译

问题一:unable to find sdk 'macosx.internal'

image

问题二:文件找不到的报错问题

【1】‘sys/reason.h’ file not found

image.png

【2】‘mach-o/dyld_priv.h’ file not found

#define DYLD_MACOSX_VERSION_10_11 0x000A0B00
#define DYLD_MACOSX_VERSION_10_12 0x000A0C00
#define DYLD_MACOSX_VERSION_10_13 0x000A0D00
#define DYLD_MACOSX_VERSION_10_14 0x000A0E00

【3】‘os/lock_private.h’ file not found 和 ‘os/base_private.h’ file not found

【4】‘pthread/tsd_private.h’ file not found 和 ‘pthread/spinlock_private.h’ file not found

【5】‘System/machine/cpu_capabilities.h’ file not found

拷贝后


image.png

【6】os/tsd.h’ file not found

【7】‘System/pthread_machdep.h’ file not found

在最新版的macOS 10.15中最新版下载的libc中没有这个h文件,需要下载Libc-583版本

【8】‘CrashReporterClient.h’ file not found

【9】‘objc-shared-cache.h’ file not found

【10】Mismatch in debug-ness macros

【11】’_simple.h’ file not found

【12】‘kern/restartable.h’ file not found

【13】‘Block_private.h’ file not found

【14】libobjc.order 路径问题

问题描述为:can't open order file: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/AppleInternal/OrderFiles/libobjc.order

【15】Xcode 脚本编译问题
问题描述为:/xcodebuild:1:1: SDK "macosx.internal" cannot be located.

【16】library not found for -lCrashReporterClient
选择 target -> objc -> Build Settings 在 Other Linker Flags 中删除 -lCrashReporterClient ( Debug 和 Release 都删了)

编译好的
参考

上一篇 下一篇

猜你喜欢

热点阅读