title: Compiling and linking libev on Mac OS X
body: <p>Yet another symbol(s) not found issue with Mac OS X. I wrote a C program that uses the libev event loop library that when compiled produces this output:</p>
  
  <pre><code>$ make
  clang midnight.c midnight_logging.c -o midnight
  Undefined symbols for architecture x86_64:
    "_ev_default_loop", referenced from:
        _main in midnight-Wlcawk.o
    "_ev_io_start", referenced from:
        _main in midnight-Wlcawk.o
    "_ev_run", referenced from:
        _main in midnight-Wlcawk.o
  ld: symbol(s) not found for architecture x86_64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  make: *** [midnight] Error 1
  </code></pre>
  
  <p>I used homebrew to install libev. The shared library is in /usr/local/lib per normal and I've used every combination of compiler arguments including "-I /usr/local/lib", "-l libev" and "-L /usr/local/lib".</p>
  
  <p>Assistance appreciated, I'd rather not have to statically compile.</p>