2

I am trying to refer to object files generated by clang from ObjC sources from C code, however the compiler is generating symbols not prepended by underscore so extern specification does not work. I'm using the latest Apple clang. I am guessing this must be possible, since kernels would need to do this. Anyone confirm it is possible or not, if so how to do it, if not, a workaround if known please. Thanks!

Yttrill
  • 4,725
  • 1
  • 20
  • 29

1 Answers1

2

Sorry I found the answer immediately after posting the question:

extern void *name asm("name");

appears to work with both clang and gcc. Not sure about Windows.

Yttrill
  • 4,725
  • 1
  • 20
  • 29