iOS

OC底层探索01:objc-781 源码调试和编译

2020-09-09  本文已影响0人  木扬音

准备工作

编译环境 & objc源码

源码下载

1、苹果所有开源源码总地址,根据相应的版本查找对应的源码,以macOS 10.15为例: macOS --> 10.15 --> 选择10.15 --> 搜索 objc
2、苹果源码直接下载地址,直接搜索想要下载的源码名称,例如objc直接搜索 objc --> objc4/ --> 选择相应的objc的版本

依赖文件下载

image.png

源码编译

1、unable to find sdk 'macosx.internal'

2、'sys/reason.h' file not found

3、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
image.png

4、'os/lock_private.h' file not found

5、'pthread/tsd_private.h' file not found'pthread/spinlock_private.h' file not found

6、'System/machine/cpu_capabilities.h' file not found

7、'os/tsd.h' file not found

8、'System/pthread_machdep.h' file not found

9、'CrashReporterClient.h' file not found

10、'objc-shared-cache.h' file not found

11、Mismatch in debug-ness macros

12、'_simple.h' file not found

13、'Block_private.h' file not found

14、'kern/restartable.h' file not found

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

16、/xcodebuild:1:1: SDK "macosx.internal" cannot be located.

17、library not found for -lCrashReporterClient

编译调试

源码调试

上一篇下一篇

猜你喜欢

热点阅读