When I compile yaml-cpp, the "undefined reference ..." occurs.
undefined reference to `testing::internal::EqFailure(char const*, char const*, std::__cxx11::basic_string
......
undefined reference to`testing::internal::GetBoolAssertionFailureMessage[abi:cxx11]
However, when option(YAML_CPP_BUILD_TESTS "Enable testing" ON)
is changed to option(YAML_CPP_BUILD_TESTS "Enable testing" OFF)
in CmakeLists.txt, yaml-cpp can be compiled successfully.
The version of GCC is 9.5.0. It seems to be about the criterion of C++11. Can anyone explain the reason for this phenomenon?
Any answer is appreciated.
Aucun commentaire:
Enregistrer un commentaire