title: undefined reference to YAML::LoadFile
body: <p>I'm trying to use the new version of libyaml-cpp and having linker problems (<code>undefined reference to 'YAML::LoadFile(std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)'</code>). </p>
  
  <p>I build the library as follows:</p>
  
  <pre><code>cmake -DBUILD_SHARED_LIBS=ON ..
  make
  sudo make install
  </code></pre>
  
  <p>Then I include <code>yaml-cpp/yaml.h</code> and call <code>YAML::LoadFile( some_string );</code>. My compilation line is:</p>
  
  <pre><code>g++ -L/usr/local/lib -I/usr/local/include -lyaml-cpp -std=c++0x -o $@  $^
  </code></pre>
  
  <p>I've tried putting the exact <code>.so</code> file in there as well with no luck. Using <code>nm</code> I can see a <code>LoadFile</code> function in the shared library. I can't figure out now if I'm somehow using the wrong build line or there is something wrong with the library.</p>