title: yaml::BadFile Program Termination
body: <p>I have build yaml-cpp and then also did </p>
  
  <pre><code>make install
  </code></pre>
  
  <p>Now everything has been done and setup. 
  Now, I have a c++ file, which is parsing a user agent string. 
  I have used uap-cpp library from github for parsing, which has a dependency on yaml-cpp. </p>
  
  <p>I have run this same c++ file on my mac machine with no issues. But when I run the same file on Ubuntu(linux), I get this error below.</p>
  
  <pre><code>cc-user-2154@CC-USER-2154:~/Desktop/cocubes/uap-cpp$ g++ example.cpp libuaparser_cpp.a -L /usr/local/lib/  -lyaml-cpp -lboost_regex -std=c++11
  cc-user-2154@CC-USER-2154:~/Desktop/cocubes/uap-cpp$ ./a.out 
  terminate called after throwing an instance of 'YAML::BadFile'
    what():  bad file
  Aborted (core dumped)
  </code></pre>
  
  <p>Now an interesting thing happened. 
  I ran command 
  sudo apt-get install libyaml-cpp-dev </p>
  
  <p>Now it throws an error on compilation. The error is </p>
  
  <pre><code>cc-user-2154@CC-USER-2154:~/Desktop/cocubes/uap-cpp$ g++ example.cpp libuaparser_cpp.a   -lyaml-cpp -lboost_regex -std=c++11
  libuaparser_cpp.a(UaParser.o): In function `YAML::TypedBadConversion&lt;std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;::~TypedBadConversion()':
  /home/cc-user-2154/Desktop/cocubes/yaml-cpp/include/yaml-cpp/exceptions.h:212: undefined reference to `YAML::BadConversion::~BadConversion()'
  libuaparser_cpp.a(UaParser.o): In function `YAML::TypedBadConversion&lt;std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;::~TypedBadConversion()':
  /home/cc-user-2154/Desktop/cocubes/yaml-cpp/include/yaml-cpp/exceptions.h:212: undefined reference to `YAML::BadConversion::~BadConversion()'
  libuaparser_cpp.a(UaParser.o): In function `YAML::BadConversion::BadConversion(YAML::Mark const&amp;)':
  /home/cc-user-2154/Desktop/cocubes/yaml-cpp/include/yaml-cpp/exceptions.h:206: undefined reference to `vtable for YAML::BadConversion'
  libuaparser_cpp.a(UaParser.o): In function `YAML::detail::node&amp; YAML::detail::node_data::get&lt;std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;(std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, std::shared_ptr&lt;YAML::detail::memory_holder&gt;)':
  /home/cc-user-2154/Desktop/cocubes/yaml-cpp/include/yaml-cpp/node/detail/impl.h:143: undefined reference to `YAML::detail::node_data::convert_to_map(std::shared_ptr&lt;YAML::detail::memory_holder&gt;)'
  libuaparser_cpp.a(UaParser.o):(.data.rel.ro._ZTIN4YAML18TypedBadConversionINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE[_ZTIN4YAML18TypedBadConversionINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE]+0x10): undefined reference to `typeinfo for YAML::BadConversion'
  collect2: error: ld returned 1 exit status
  </code></pre>