Errors Using yaml-cpp Library in ROS
Hi guys, I'm using ROS Fuerte and trying to use yaml parsing in my program. I have a "include <yaml-cpp yaml.h="">" in my code but I am still getting errors. According to the ROS wiki, I should not need to change my CMakelists.txt or manifest.xml to use it but I still get errors like :
/home/aramus/fuerte_workspace/sandbox/image_test/src/image_test.cpp:54: undefined reference to YAML::Node::Node()' /home/aramus/fuerte_workspace/sandbox/image_test/src/image_test.cpp:92: undefined reference to YAML::Node::~Node()' /home/aramus/fuerte_workspace/sandbox/image_test/src/image_test.cpp:92: undefined reference to YAML::Parser::~Parser()' /home/aramus/fuerte_workspace/sandbox/image_test/src/image_test.cpp:92: undefined reference to YAML::Node::~Node()' /home/aramus/fuerte_workspace/sandbox/image_test/src/image_test.cpp:92: undefined reference to YAML::Parser::~Parser()' /home/aramus/fuerte_workspace/sandbox/image_test/src/image_test.cpp:92: undefined reference to YAML::Node::~Node()' /home/aramus/fuerte_workspace/sandbox/image_test/src/image_test.cpp:92: undefined reference to YAML::Parser::~Parser()'
Any help on how to fix this would be great. Thanks!
EDIT: I fixed it by adding rosbuild_add_executable(image_test src/image_test.cpp) target_link_library(${PROJECT_NAME} yaml-cpp)
I originally had the two switched around but order matters a lot!
Please include your CMakeLists.txt file and manifest.txt .
Can you include the ROS wiki link that specified that you shouldn't need to change your CMakeLists.txt or manifest.xml to use yaml-cpp?