fatal error: yaml-cpp/yaml.h: No such file or directory

user1251007 picture user1251007 · May 14, 2014 · Viewed 12.4k times · Source

I am trying to compile my own c++/qt5.2 app which uses yaml-cpp under Ubuntu 14.04.

While issuing the make command I get the following error

fatal error: yaml-cpp/yaml.h: No such file or directory

on the line:

#include <yaml-cpp/yaml.h>

How can I fix this?

Answer

user1251007 picture user1251007 · May 14, 2014

You need to install the yaml-cpp library.

Under Ubuntu 14.04 you can do this by simply running one of the following commands in a terminal window (depending one the API you use):

sudo apt-get install libyaml-cpp-dev

or

sudo apt-get install libyaml-cpp0.3-dev

See the yaml-cpp project page for other operating systems and differences between old (0.3) and new API.