title: How to static link on OS X
body: <p>I'm trying to link to a static library on OS X. I used the <code>-static</code> flag in the gcc command but I get the following error message:</p>
  
  <pre>
  ld_classic: can't locate file for: -lcrt0.o
  collect2: ld returned 1 exit status
  </pre>
  
  <p>I looked in the man pages and it reads something like: </p>
  
  <blockquote>
    <p>This option will not work on Mac OS X unless all libraries (including libgcc.a) have also been compiled with -static. Since neither a static version of libSystem.dylib nor crt0.o  are provided, this option is not useful to most people.</p>
  </blockquote>
  
  <p>Is there another way to link to this static library?</p>