在 Linux 库上使用 G++ 4.6.2 是根据说明构建的。测试目录中的 run_tests 工作正常。
setenv YAML_HOME /nfs/site/proj/dt/ltt_test_15/work_area/ironchef/new_version/ironchef/trunk/yaml/yaml-cpp-0.5.0
ls $YAML_HOME 总计 640 16 CMakeCache.txt 0 build/ 0 libyaml-cpp.so.0.5@ 8 test/ 8 CMakeFiles/ 8 cmake_install.cmake 480 libyaml-cpp.so.0.5.0* 8 util/ 16 CMakeLists.txt 0 include/ 8 license.txt 8 yaml-cpp.pc 8 CTestTestfile.cmake 8 install.txt 8 matt_sandbox/ 8 yaml-cpp.pc.cmake 40 Makefile 0 libyaml-cpp.so@ 8 src/
cd matt_sandbox g++ -o test_yaml -g -I/usr/intel/pkgs/boost/1.48.0-gcc-4.6.2/include -I$YAML_HOME/include -I$YAML_HOME/include/yaml-cpp -I$YAML_HOME /include/yaml-cpp/node -I$YAML_HOME/include/yaml-cpp/node/detail -I$YAML_HOME/include/yaml-cpp/contrib main.cpp
编译器错误:main.cpp:在函数 `void operator>>(const YAML::Node&, Vec3&)' 中:main.cpp:25:错误:'YAML::Node::operator 中的 'operator>>' 不匹配[](const Key&) const [with ... 类似错误 .... main.cpp:51: error: 'class YAML::Parser' has no member named 'GetNextDocument'
从http://code.google.com/p/yaml-cpp/wiki/HowToParseADocument上的完整示例复制并粘贴代码