3

Using G++ 4.6.2 on Linux Library was built according to instructions. run_tests in test directory works fine.

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 total 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

Compiler errors: main.cpp: In function `void operator>>(const YAML::Node&, Vec3&)': main.cpp:25: error: no match for 'operator>>' in 'YAML::Node::operator[](const Key&) const [with ... similar errors .... main.cpp:51: error: 'class YAML::Parser' has no member named 'GetNextDocument'

Copy-and-paste code from complete example on http://code.google.com/p/yaml-cpp/wiki/HowToParseADocument

1 Answer 1

3

That example uses the old API (version 0.3.0), but you're using the new API (version 0.5.0). I've updated the main page to make that clear.

For examples using the new API, see http://code.google.com/p/yaml-cpp/wiki/Tutorial.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, Jesse! That helped a lot. Another thing that would help is if you could give a complete example for your new API (like you do for your old API).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.