title: OS X 10.11 library not found
body: <p>I want to compile an app which using the libyaml. I have built it in OS X 10.10 successfully. But after upgrading to OS X 10.11, I just got the error message <code>ld: library not found for -lyaml</code>. libyaml is installed by Homebrew and locates on  <code>/usr/local/lib</code>. I can find <code>libyaml.dylib</code> in <code>/usr/local/lib</code>.</p>
  
  <p>I have done the following:</p>
  
  <ul>
  <li><code>csrutil disable</code> to disalbe System Integrity Protection which will prevent linking to external libraries in Recovery OS</li>
  <li><code>export C_INCLUDE_PATH=/usr/local/include</code> for looking for header file of libyaml</li>
  <li><code>export DYLD_LIBRARY_PATH=/usr/local/lib</code> for looking for dynamic library of libyaml, that is <code>libyaml.dylib</code></li>
  </ul>
  
  <p>but still got the same error message.</p>
  
  <p>Run <code>otool -L /usr/local/lib/libyaml.dylib</code> got:</p>
  
  <pre><code>/usr/local/lib/libyaml.dylib:
      /usr/local/lib/libyaml-0.2.dylib (compatibility version 3.0.0, current version 3.4.0)
      /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1225.1.1)
  </code></pre>
  
  <p>Platform: OS X 10.11, Xcode 7.0.1</p>
  
  <p>How to solve this?</p>