0

i want to use an old project with yaml-cpp, but when I try to recompile my MakeFile I have got this error

patchyLigne3D.o: dans la fonction « YAML::Node::Scalar[abi:cxx11]() const »:
/usr/include/yaml-cpp/node/impl.h:158: référence indéfinie vers «YAML::detail::node_data::empty_scalar[abi:cxx11] »
patchyLigne3D.o: dans la fonction « mols::Parameters::Parameters(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) »:
/home/kafka/mols/init/Parameters.hh:48: référence indéfinie vers « YAML::LoadFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) »
patchyLigne3D.o: dans la fonction « YAML::detail::node_ref::set_scalar(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) »:
/usr/include/yaml-cpp/node/detail/node_ref.h:35: référence indéfinie vers « YAML::detail::node_data::set_scalar(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) »
collect2: erreur: ld a retourné 1 code d'état d'exécution

I suppose it's because of abi:cxx11 and the changement from gcc4 to gcc5 (I had to install gcc5.3 recently an other project) so I tried to reinstall yaml-cpp with my new gcc but without sucess.

edit :

I think I have eliminate all references to yaml (locate is not accurate for this ... i use commands sudo find / -name "libyaml-cpp.so", sudo find / -name "libyaml-cpp" and sudo find / -name "libyaml-cpp.a" and delete all the result). After reinstallation, I have a new error message

patchyLigne3D.o: dans la fonction « YAML::detail::node& YAML::detail::node_data::get<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::shared_ptr<YAML::detail::memory_holder>) »:
/usr/include/yaml-cpp/node/detail/impl.h:89: référence indéfinie vers « YAML::detail::node_data::convert_to_map(boost::shared_ptr<YAML::detail::memory_holder>) »
patchyLigne3D.o: dans la fonction « YAML::detail::node& YAML::detail::node_data::get<int>(int const&, boost::shared_ptr<YAML::detail::memory_holder>) »:
/usr/include/yaml-cpp/node/detail/impl.h:89: référence indéfinie vers « YAML::detail::node_data::convert_to_map(boost::shared_ptr<YAML::detail::memory_holder>) »
collect2: erreur: ld a retourné 1 code d'état d'exécution
Kafka
  • 720
  • 6
  • 21
  • You might have two copies of yaml-cpp installed. Can you check? (e.g., look in your `/usr/local/lib` or similar) – Jesse Beder Apr 26 '16 at 13:25
  • I found four files : /usr/lib/x86_64-linux-gnu/libyaml-cpp.a /usr/lib/x86_64-linux-gnu/libyaml-cpp.so /usr/lib/x86_64-linux-gnu/libyaml-cpp.so.0.5 /usr/lib/x86_64-linux-gnu/libyaml-cpp.so.0.5.1 my last install was static (.a). Should I delete de .so ? – Kafka Apr 26 '16 at 13:32
  • That looks reasonable, but it can't hurt to delete any trace of it and reinstall. – Jesse Beder Apr 26 '16 at 14:02
  • Also see if it there might be copies in any other locations, e.g., /opt/local or some such. – Jesse Beder Apr 26 '16 at 14:02

0 Answers0