6

As is know to us all, objc's runtime is open source and can be downloaded from: http://www.opensource.apple.com/tarballs/objc4/

After I download the tarball an extract it. I open objc.xcodeproj using xcode. However, when I build it, there are many erros, such as, can not find some headers. I googled all the missing headers, download them, put them in /tmp/objc.dst/usr/include. But without luck, still errors.

I searched the internet, but I can find few documents or instructions about:

  1. how to compile apple's objc runtime from source code?
  2. After compile it , I should get libobjc.A.dylib, how to use it (as a replace of the system's libobjc.A.dylib) ?

I really appreciate any help you can provide.

1 Answer 1

3

Compile with no error under 10.10.2(14C1514), Xcode 6.2 (6C131e).

  1. You need OSX 10.8 SDK, which you can get from early Xcode install dmg or this repository https://github.com/phracker/MacOSX-SDKs (If you download sdk from this repo, you may need to fix the soft links using this script http://blog.jeswang.org/blog/2014/10/26/fix-slash-soft-slash-links-slash-in-slash-an-slash-archived-slash-file/, you may need to run the script two times for the recursion of references)

  2. More the 10.8 sdk to /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs

  3. Clone this repository https://github.com/Jeswang/objc4-532.2

  4. Compile and Run the debug-objc scheme

  5. You can set any breakpoint in the source and debug the whole runtime.

Sign up to request clarification or add additional context in comments.

1 Comment

thank you very much! What's more I found github.com/RetVal/objc4-532.2 works under Yosemite with xcode 6 (10.10 sdk)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.