How do I make a Mach-O binary from an object file?

Posted by Mike on Stack Overflow See other posts from Stack Overflow or by Mike
Published on 2010-05-07T03:29:26Z Indexed on 2010/05/07 3:38 UTC
Read the original article Hit count: 246

Filed under:
|

I have an object file, which I'd like to make into a Mach-O binary(I'm on Mac OS 10.6). Running ld source.o produces the following output:

Undefined symbols:
  "_printf", referenced from:
      _main in source.o
ld: symbol(s) not found for inferred architecture x86_64

How can I reference libSystem(or whatever library includes printf) using ld?

© Stack Overflow or respective owner

Related posts about linker

Related posts about macosx