I am running the example found here to try out using YAML in C++. I copied the code verbatim into test.cpp in a new project folder. I compiled YAML into a static library and am linking it to my project. I'm running Ubuntu 11.10. I use the following command to compile:
g++ -Wall -I. -g test.cpp -lyaml-cpp -L.
I get the following error statement:
terminate called after throwing an instance of 'YAML::ParserException'
what(): yaml-cpp: error at line 4, column 2: illegal block entry
Aborted
What is the meaning of this exception? And what could be wrong? I couldn't find a clear documentation for what each of the exceptions could mean, so even a link to this information would be helpful. I am probably out of my depth, as I am new to YAML, using libraries, and linux for that matter. Thanks in advance for your help.
Edit: The error occurs before "parser.GetNextDocument(doc)". Also, I ran a simpler example from the website that stores a single scalar, and that worked fine. Is the exception about my input file, or my code?