macosx.c 328 B

1234567891011
  1. #include <objc/runtime.h>
  2. #include <objc/message.h>
  3. #include <stdio.h>
  4. static void create_shared_application(void) {
  5. id nsa = objc_getClass("NSApplication");
  6. SEL sha = sel_registerName("sharedApplication");
  7. id (*msg_send)(id, SEL) = (id (*)(id, SEL))objc_msgSend;
  8. msg_send(nsa, sha);
  9. printf("[macosx] hello.\r\n");
  10. }