I am trying to use the new version of libyaml-cpp and have problems with linkers ( undefined reference to 'YAML::LoadFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)').
I create the library as follows:
cmake -DBUILD_SHARED_LIBS=ON ..
make
sudo make install
Then I turn on yaml-cpp/yaml.hand call YAML::LoadFile( some_string );. My compilation line:
g++ -L/usr/local/lib -I/usr/local/include -lyaml-cpp -std=c++0x -o $@ $^
I tried to put the exact file .sowhere no luck. Using nm, I see a function LoadFilein a shared library. I can’t understand if I somehow use the wrong assembly line or something is wrong with the library.
source
share