Questions tagged [yaml-cpp]

yaml-cpp is an open source C++ library, for parsing and emitting YAML.

yaml-cpp is an open source C++ library, hosted on GitHub, for parsing and emitting YAML.

314 questions
3
votes
1 answer

YAML unresolved external symbol (yaml-cpp)

I have a YAML file consisting of: abc: 123 And I'm using the following code to load it: YAML::Node base = YAML::Load("test.yaml"); std::cout << base["abc"].as() << std::endl; MSVC fails to link (caused by the second line), stating: unresolved…
Thoom1940
  • 31
  • 2
3
votes
0 answers

Why yaml is popular? Is there anything else that does better.

I know that this is a very generic question, but I am sure this question will benefit most of the developers in making a choice of YAML over other markup languages stack overflow. I came to know about YAML from one of my lab mates, who used to use…
kishoredbn
  • 2,007
  • 4
  • 28
  • 47
3
votes
3 answers

undefined reference yaml-cpp

I'm on Manjaro Linux using gcc and codelite to compile my code. It's a project with sfml and yaml-cpp in C++. My GCC version is 4.9.2 (20150304) GCC compiler flags are -pg;-g;-O0;-O2;-Wall;-std=c++14 My yaml-cpp version is 0.5.1-1 When I compile I…
Waltharnack
  • 33
  • 1
  • 4
3
votes
1 answer

Trying to parse OpenCV YAML ouput with yaml-cpp

I've got a series of OpenCv generated YAML files and would like to parse them with yaml-cpp I'm doing okay on simple stuff, but the matrix representation is proving difficult. # Center of table tableCenter: !!opencv-matrix rows: 1 cols: 2 …
Kenn Sebesta
  • 7,485
  • 1
  • 19
  • 21
3
votes
2 answers

Yaml-cpp parsing doesn't work space is missing after colon

I have encountered problem in yaml-cpp parser. When I try to load following definition: DsUniversity: university_typ: {type: enum, values:[Fachhochschule, Universitat, Berufsakademie]} students_at_university: {type: string(50)} I'm getting…
Ludek Vodicka
  • 1,610
  • 1
  • 18
  • 33
3
votes
0 answers

Unresolved externals on linking yaml-cpp against my project

When I try to link my project against yaml-cpp library, I get unresolved externals Error 1680 error LNK2019: unresolved external symbol "class YAML::Node __cdecl YAML::LoadFile(class std::basic_string,class std::allocator > const &)" …
ReBirTH
  • 91
  • 7
3
votes
2 answers

How to install and use YAML-Cpp

I want to learn YAML (and use it with C++) but i'm stuck trying to setup YAML-Cpp. Let me explain what i've done so far. I downloaded the source code (version 0.5.1) Installed Cmake (for Windows) Installed the Boost libraries (precompiled for…
Marlon Dias
  • 55
  • 1
  • 7
3
votes
1 answer

How to specify the output format for Null node in yaml-cpp?

I use current(2013/12/12) latest revision of yaml-cpp. I noticed that both YAML::Load("") and YAML::Load("---\n...") results in a Null node, i.e. YAML::Load("").Type() == YAML::NodeType::Null yet when sent to std::ostream the former outputs an empty…
Yuki Inoue
  • 3,569
  • 5
  • 34
  • 53
3
votes
0 answers

yaml-cpp importing strings from file gives artifacts?

When trying something with yaml-cpp I was stuck at strings.. Especially since they seem to not round-trip well... When I read a string from a file - and then later export that string there seems to be an artifact when exporting.. Ie the…
paul23
  • 8,799
  • 12
  • 66
  • 149
3
votes
1 answer

how to set yaml-cpp node style?

I have a vector3 class. class vector3 { float x, y, z; } node["x"] = vector3.x; node["y"] = vector3.y; node["z"] = vector3.z; The result is x: 0 y: 0 z: 0 I want the result to be: {x: 0, y: 0, z: 0} If use the old API, I can use YAML::Flow…
3
votes
1 answer

Complete Example Yaml program on http://code.google.com/p/yaml-cpp/wiki/HowToParseADocument does not compile

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 …
Matt Frazer
  • 177
  • 1
  • 7
3
votes
1 answer

Copy Semantics and Comparison

Is there a way to get a copy of all of the values in a YAML::Node object into a new object (i.e. a clone)? Also is there a way to test for equality between two YAML::Node objects by the values in the node (i.e. a .equals() function as opposed to an…
JDW
  • 460
  • 3
  • 11
2
votes
1 answer

yaml-cpp: Linking failed

I'd like to use the yaml-cpp library to read some YAML strings. In order to do so, I try to compile the following C++ code: #include #include #include #include #include #include…
SecStone
  • 1,733
  • 4
  • 20
  • 31
2
votes
1 answer

"Illegal block entry" with YAML monsters example in yaml-cpp

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…
Joe
  • 250
  • 3
  • 16
2
votes
2 answers

Parsing comments in yaml-cpp

as a part of a bigger project i create a graphical yaml-file editor in c++ (and Qt). I use the yaml-cpp library and everything works fine. Ist it possible to parse comments, too? Writing comments is no problem, but i did not find a solution to read…