yaml-cpp
yaml-cpp copied to clipboard
What could possibly cause such a mistake?
Undefined symbols for architecture x86_64:
"YAML::detail::node_data::empty_scalar", referenced from:
YAML::Node::Scalar() const in config.cc.o
"YAML::operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, YAML::Node const&)", referenced from:
jujimeizuo::Config::LoadFromYaml(YAML::Node const&) in config.cc.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [../lib/libsrc.dylib] Error 1
make[1]: *** [CMakeFiles/src.dir/all] Error 2
make: *** [all] Error 2
when I define std::list<std::pair<std::string, const YAML::Node> >& output
, and execute the follow:
output.push_back(std::make_pair(prefix, node));
then the program compile failure, and I get some mistakes as above.
But when I Comment out that, I can make
successfully.